Skip to content

Latest commit

 

History

History
79 lines (51 loc) · 2.33 KB

overlayfs-cve-2021-3493.md

File metadata and controls

79 lines (51 loc) · 2.33 KB
description
Exploit a 2021 Kernel vulnerability in Ubuntu to become root almost instantly!

🖥 OverlayFS: CVE-2021-3493

{% embed url="https://tryhackme.com/room/overlayfs" %} https://tryhackme.com/room/overlayfs {% endembed %}

Room Attributes Value
Subscription Required False [Free]
Type Walkthrough
Difficulty Info
Tags PrivEsc, Linux, Ubuntu, Kernel, CVE-2021-3493

Task 1 - What is OverlayFS?

I have a very rough overview of what OverlayFS is

{% hint style="success" %} No answer needed {% endhint %}

Task 2 - CVE-2021-3493 - OverlayFS Exploit

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

{% hint style="success" %} No answer needed {% endhint %}

SSH into the machine with the credentials provided in the task text.

{% hint style="success" %} No answer needed {% endhint %}

Grab the source code for the exploit from SSD-Disclosure here and save it as exploit.c on the target machine.

{% hint style="warning" %} HINT: Perhaps the easiest way is copy/pasting the code into a text editor like Nano or Vim! {% endhint %}

{% hint style="success" %} No answer needed {% endhint %}

Compile the exploit with gcc. If you're finding this difficult, a command is given in the hints.

{% hint style="warning" %} HINT: gcc -o exploit exploit.c {% endhint %}

{% hint style="success" %} No answer needed {% endhint %}

Run your compiled exploit, and get root! What's the flag in /root/?

Reveal Flag 🚩

🚩thm{27aaa5865a52dcd4cb04c0e0a2d39404}

Task 3 - Further reading

Hope you've enjoyed this short room.

{% hint style="success" %} No answer needed {% endhint %}