๐ก๏ธ CVE-2021-3560 Privilege Escalation Exercise
๐ Overview
This repository contains materials for a hands-on cybersecurity exercise centered on CVE-2021-3560, a privilege escalation vulnerability in polkit.
Discovered by GitHub Security Lab in 2021, this flaw allowed unprivileged Linux users to gain root access by exploiting a race condition in user credential handling.
The vulnerability affected multiple Linux distributions and was patched in mid-2021.
๐ฎ Scenario: "Sidewinder Swifty's Silent Escalation"
You are Sidewinder Swifty โ a sly cyber-infiltrator known for slipping past digital defenses. You've gained low-level access to a target Ubuntu 20.04 machine. Your mission:
- Exploit CVE-2021-3560
- Escalate privileges to root
- Maintain access and leave no trace
โ ๏ธ Precision and timing are key. Success depends on your ability to emulate real-world attacker tradecraft.
๐ง Learning Objectives
This exercise will guide you through practical offensive security concepts, including:
- ๐ผ Privilege Escalation โ Gaining unauthorized administrative access
- โฑ๏ธ Race Conditions โ Exploiting timing-based flaws
- ๐ CVE Exploitation โ Leveraging public vulnerabilities
- ๐งฌ Persistence โ Maintaining access after compromise
- ๐ค User Obfuscation โ Masking your identity and actions
- ๐ญ Privilege Masquerading โ Posing as a legitimate system user
- ๐ File Transfer โ Using
scp and netcat
- ๐ฆ Compression โ Archiving with
tar
- ๐ Sensitive File Access โ Reading protected system files
- ๐งพ Log Manipulation โ Editing logs to cover your tracks
- ๐ต๏ธ Anti-Forensics โ Evading forensic analysis
- ๐งจ Threat Actor Simulation โ Reproducing attacker TTPs (Tactics, Techniques, Procedures)
๐ฏ Expected Outcomes
By completing this challenge, you will:
- Gain hands-on experience exploiting privilege escalation vulnerabilities
- Understand the importance of secure permissions and patch management
- Practice realistic post-exploitation tactics
- Learn how attackers maintain stealth and persistence
- See firsthand why timely system updates are critical for defense
โ ๏ธ Disclaimer
This project is intended for educational and ethical research purposes only.
Do not use these techniques on systems you do not own or have explicit permission to test.
Do not use these techniques on any system you do not own or have explicit permission to test. Unauthorized access is illegal and unethical.
Watch the demo on YouTube