performing-privilege-escalation-on-linux
하는 일
이 가이드는 제한된 권한으로 시작하더라도 Linux 시스템에서 관리자(root) 권한을 얻는 방법을 설명합니다. 잘못된 설정, 취약한 프로그램, 약한 권한을 악용하는 기법을 사용합니다.
사용하는 경우
- ✓Linux 시스템의 보안을 테스트할 때.
- ✓Linux 시스템에 초기 접근을 얻은 뒤 더 높은 권한이 필요한 경우.
- ✓시스템의 보안 보호 장치가 작동하는지 확인할 때.
스킬 링크
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-privilege-escalation-on-linux/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 Linux 서버에서 어떻게 관리자가 될 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
가이드는 특별한 권한이 있는 프로그램을 찾고, 잘못 설정된 'sudo'(관리자 작업을 허용하는 명령)를 점검하며, 알려진 시스템 취약점을 검색하는 도구를 사용하라고 제안합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Performing Privilege Escalation on Linux
Legal Notice: This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.
Overview
Linux privilege escalation involves elevating from a low-privilege user account to root access on a compromised system. Red teams exploit misconfigurations, vulnerable services, kernel exploits, and weak permissions to achieve root. This skill covers both manual enumeration techniques and automated tools for identifying and exploiting privilege escalation vectors.
When to Use
- When conducting security assessments that involve performing privilege escalation on linux
- When following incident response procedures for related security events
- When performing scheduled security testing or auditing activities
- When validating security controls through hands-on testing
Prerequisites
- Familiarity with red teaming concepts and tools
- Access to a test or lab environment for safe execution
- Python 3.8+ with required dependencies installed
- Appropriate authorization for any testing activities
MITRE ATT&CK Mapping
- T1548.001 - Abuse Elevation Control Mechanism: Setuid and Setgid
- T1548.003 - Abuse Elevation Control Mechanism: Sudo and Sudo Caching
- T1068 - Exploitation for Privilege Escalation
- T1574.006 - Hijack Execution Flow: Dynamic Linker Hijacking
- T1053.003 - Scheduled Task/Job: Cron
- T1543.002 - Create or Modify System Process: Systemd Service
Key Escalation Vectors
SUID/SGID Binaries
- Find SUID binaries:
find / -perm -4000 -type f 2>/dev/null - Check GTFOBins for exploitation methods
- Custom SUID binaries may have vulnerabilities
Sudo Misconfigurations
sudo -lto list allowed commands- Wildcards in sudo rules allow injection
- NOPASSWD entries for dangerous commands
- sudo versions vulnerable to CVE-2021-3156 (Baron Samedit)
Kernel Exploits
- Dirty Cow (CVE-2016-5195) for older kernels
- Dirty Pipe (CVE-2022-0847) for kernel 5.8+
- PwnKit (CVE-2021-4034) for pkexec
- GameOver(lay) (CVE-2023-2640, CVE-2023-32629) for Ubuntu
Cron Job Abuse
- World-writable cron scripts
- PATH hijacking in cron jobs
- Wildcard injection in cron commands
Capabilities
getcap -r / 2>/dev/nullto find binaries with capabilities- cap_setuid allows UID manipulation
- cap_dac_override bypasses file permissions
Writable Service Files
- Systemd unit files with weak permissions
- Init scripts writable by non-root users
- Socket files in accessible locations
Tools and Resources
| Tool | Purpose |
|---|---|
| LinPEAS | Automated privilege escalation enumeration |
| LinEnum | Linux enumeration script |
| linux-exploit-suggester | Kernel exploit matching |
| pspy | Process monitoring without root |
| GTFOBins | SUID/sudo binary exploitation reference |
| PEASS-ng | Privilege escalation awesome scripts suite |
Validation Criteria
- Enumeration performed using automated tools
- Privilege escalation vector identified
- Root access achieved through identified vector
- Evidence documented (screenshots, command output)
- Alternative escalation paths identified
자주 묻는 질문
‘root’란 무엇인가요?
Linux의 최고 사용자 이름으로, 시스템을 완전히 제어할 수 있습니다.
이것을 사용해도 안전한가요?
이 가이드는 통제된 환경에서 허가된 보안 테스트에만 사용해야 합니다. 허가 없이 시스템에 사용하는 것은 불법입니다.
어떤 도구를 사용하나요?
LinPEAS와 LinEnum은 취약점을 자동으로 찾는 데 도움을 주고, GTFOBins는 특정 프로그램을 악용하는 방법을 정리한 참고 자료입니다.
상세 정보
작성자의 원본 설명
Guides manual enumeration and automated tooling to escalate from a low-privilege Linux user to root by exploiting misconfigurations, vulnerable services, kernel exploits, and weak permissions, mapped to MITRE ATT&CK. Use during authorized red team engagements or penetration tests once initial low-privilege access on a Linux host is obtained and root-level access is needed.
인기도
- GitHub 스타
- 35k
- 순위
- #8289
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 8. 31.
댓글
- …
이 저장소의 다른 스킬
abusing-dpapi-for-credential-access
35kAI 에이전트에게 특정 작업을 위한 준비된 지침을 제공해, 더 잘하고 더 빠르게 처리하도록 합니다.
abusing-shadow-credentials-for-privesc
35kAI 에이전트가 명확하고 잘 구성된 텍스트를 쓰도록 가르칩니다.
achieving-cmmc-level-2-compliance
35kCMMC Level 2 규정 준수를 위한 환경을 준비하도록 돕습니다. 보안 요구 사항을 구현하고 필요한 문서를 관리합니다.
acquiring-disk-image-with-dd-and-dcfldd
35k에이전트가 하드 드라이브의 정확한 복사본을 만들도록 돕습니다. 조사 중 정보가 손실되거나 변경되지 않도록 하는 데 유용합니다.