performing-privilege-escalation-on-linux
यह क्या करती है
यह गाइड सिखाती है कि Linux सिस्टम पर administrator (root) एक्सेस कैसे पाया जाता है, भले ही शुरुआत सीमित अधिकारों से हो। इसमें गलत कॉन्फ़िगरेशन, कमज़ोर प्रोग्राम और कमज़ोर permissions का फ़ायदा उठाने के तरीके बताए गए हैं।
कब इस्तेमाल करें
- ✓Linux सिस्टम की सुरक्षा टेस्ट करते समय।
- ✓Linux सिस्टम पर शुरुआती पहुँच मिलने के बाद, जब ज़्यादा अधिकारों की ज़रूरत हो।
- ✓यह जाँचने के लिए कि सिस्टम की सुरक्षा व्यवस्थाएँ सही काम कर रही हैं या नहीं।
Skill का लिंक
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-privilege-escalation-on-linux/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“इस Linux सर्वर पर मैं administrator कैसे बन सकता हूँ?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
गाइड सुझाती है कि विशेष permissions वाले प्रोग्राम खोजे जाएँ, 'sudo' (administrator काम करने की अनुमति देने वाली कमांड) की गलत सेटिंग्स जाँची जाएँ, और ज्ञात सिस्टम कमज़ोरियाँ खोजने वाले टूल इस्तेमाल किए जाएँ।
तकनीकी सामग्री (मूल 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' क्या है?
'Root' Linux में superuser का नाम है, जिसके पास सिस्टम पर पूरा नियंत्रण होता है।
क्या इसे इस्तेमाल करना सुरक्षित है?
यह गाइड केवल नियंत्रित माहौल में, अधिकृत सुरक्षा टेस्टिंग के लिए है। बिना अनुमति के किसी सिस्टम पर इसका इस्तेमाल गैरकानूनी है।
कौन से टूल इस्तेमाल होते हैं?
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
- अपडेट की गई
- 31/8/2026
कमेंट
- …
इस repository की और skills
abusing-dpapi-for-credential-access
35kआपके AI एजेंट को किसी खास काम के लिए तैयार instructions देता है, ताकि वह उसे बेहतर और तेज़ी से कर सके।
abusing-shadow-credentials-for-privesc
35kआपके AI एजेंट को साफ़ और अच्छी तरह से व्यवस्थित लिखना सिखाता है।
achieving-cmmc-level-2-compliance
35kयह आपके एजेंट को CMMC Level 2 compliance के लिए environment तैयार करने में मदद करता है। यह security requirements लागू करता है और ज़रूरी documentation संभालता है।
acquiring-disk-image-with-dd-and-dcfldd
35kआपके एजेंट को hard drives की exact copies बनाने में मदद करता है। जाँच के दौरान किसी भी जानकारी के खोने या बदलने से बचाने के लिए यह उपयोगी है।
मिलती-जुलती skills
reverse-engineer-anything
422kयह आपके एजेंट को REA टूल से शिप हुई ऐप्स और पैकेज को अंदर से समझने, वर्ज़न की तुलना करने या दोबारा बनाने में मदद करती है।
1password
394kयह आपके एजेंट को 1Password CLI सेट करने, साइन इन करने और सीक्रेट्स की वैल्यू चैट में छापे बिना उन्हें पढ़ने या इस्तेमाल करने में मदद करती है।
healthcheck
394kयह आपके एजेंट को उस कंप्यूटर या सर्वर का सुरक्षा ऑडिट करने देती है जिस पर OpenClaw चलता है, जिसमें SSH, firewall, अपडेट और बैकअप शामिल हैं, और फिर सुरक्षित सुधार सुझाती है।