Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2021-3493 PoC — Linux kernel 安全漏洞

Source
Associated Vulnerability
Title:Linux kernel 安全漏洞 (CVE-2021-3493)
Description:The overlayfs implementation in the linux kernel did not properly validate with respect to user namespaces the setting of file capabilities on files in an underlying file system. Due to the combination of unprivileged user namespaces along with a patch carried in the Ubuntu kernel to allow unprivileged overlay mounts, an attacker could use this to gain elevated privileges.
Readme
# OverlayFS — CVE-2021–3493 || Writeup || Tryhackme

![Capture22](https://github.com/user-attachments/assets/d4f88764-29bd-4a7a-8b46-85e55fa27be2)

## :open_book: Introduction

### What is OverlayFS.?
#### OverlayFS is a Linux kernel module that allows the system to combine several mount points into one, so that you can access all the files from each within one directory structure.

#### It’s often used by live USBs, or some other specialist applications. One use is having a read only root file system, and another partition “overlayed” with that to allow applications to write to a temporary file system.

#### More resources are included in the final task (Further reading) if you’d like to learn more about OverlayFS and this exploit.

  I have a very rough overview of what OverlayFS is — — →
> No Answer Needed

## CVE-2021–3493 — OverlayFS Exploit
### Credentials for SSH
```
Username: overlay
```
```
Password: tryhackme123
```
#### Start the Attack box and and login into the SSH using the credentials given in the task.
> Answer the questions below:

#### Deploy the machine with the Start Machine button in this task and wait up to 2 minutes for the VM to boot.
> No Answer Required.

#### SSH into the machine with the credentials provided in the task text.
> No Answer Rerquired

#### Grab the source code for the exploit from [SSD-Disclosure here](https://ssd-disclosure.com/ssd-advisory-overlayfs-pe/) and save it as exploit.c on the target machine.
> Go to the link provided and save the exploit as exploit.c using Vim editor or nano editor in the terminal.
#### Compile the exploit with gcc.
Compile the code using the command
```
 gcc -o exploit exploit.c
```
#### Run your compiled exploit, and get root!
```
./exploit
```
#### What’s the flag in /root/?
> bash-4.4# id <br>
> bash-4.4# cd /root/ <br>
> bash-4.4# cat flag.txt


## Happy Hacking..!!

File Snapshot

[4.0K] /data/pocs/a4f636b9a40fc44e549a90033d504925f03dcdab └── [1.9K] README.md 0 directories, 1 file
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →