关联漏洞
描述
Exploit a 2021 Kernel vulnerability in Ubuntu to become root almost instantly!
介绍
# OverlayFS — CVE-2021–3493 || Writeup || Tryhackme

## :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..!!
文件快照
[4.0K] /data/pocs/06ddfdae339f674fc0aef4cd271414ad4b1944c0
└── [1.9K] README.md
0 directories, 1 file
备注
1. 建议优先通过来源进行访问。
2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。