> For the complete documentation index, see [llms.txt](https://angellm.gitbook.io/hacknotes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://angellm.gitbook.io/hacknotes/htb/2022/paper.md).

# Paper

**Date**: 21/05/2022

**Difficulty**: EASY

**CTF**: <https://app.hackthebox.com/machines/Paper>

***

First things first. let’s test the connection with the target machine:

<figure><img src="/files/heZ7W2D4Iyn3LiVUp1pa" alt=""><figcaption></figcaption></figure>

The ttl value of 63 may indicate that the target machine is Linux.

Let’s launch a nmap scan in order to discover the open tcp ports:

<figure><img src="/files/fzNTL8F7hkx5x6Z4P3yz" alt=""><figcaption></figcaption></figure>

There are 3 ports open: 22 (ssh), 80 (http), 443 (https).

<figure><img src="/files/X3fEosH78Butw023B8uo" alt=""><figcaption></figcaption></figure>

Let’s see what is hosted in the http and https ports:

<figure><img src="/files/29DBw13qwRpXDoZ1KTye" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/rgaodOFeVBSischQdvaU" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/A5GU7FnPDtWvFRXHSPAN" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/oK6wyrE3lBYOI0qA38de" alt=""><figcaption></figcaption></figure>

Seems to be the same page.

<figure><img src="/files/7peUYJWgVxRQGKBzKjC1" alt=""><figcaption></figcaption></figure>

Wappalizer confirms the versions of apache and openssl. I’m going to search if any of this services has a vulnerability I can use:

<figure><img src="/files/Gb3T5xnzWSSUJLYp7X3A" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/OyhZMvTAwTts4UdcV4ey" alt=""><figcaption></figcaption></figure>

Not apparently… Let’s enumerate the directories using wfuzz:

`wfuzz -c --hc 404,403 -L -t 200 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt http://10.10.11.143/FUZZ`

<figure><img src="/files/UZucn0Bj7C1haOTfGMTw" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/aKKgcBVCzn77vpdWMWdX" alt=""><figcaption></figcaption></figure>

Looks like a standard page…

Ok, no clues. Let’s go back and see what we found so far…

Taking a look to the whatweb response, there is something that looks like a domain… `office.paper` let’s add it to the /etc/hosts file and take a look to it in the web browser:

<figure><img src="/files/2xNOajDCy9AXGgRViswN" alt=""><figcaption></figcaption></figure>

Yeah, there is a website here!

<figure><img src="/files/xHQ7ZHfor7aEw1CMWHQO" alt=""><figcaption></figcaption></figure>

This site is using Wordpress 5.2.3

Let’s take a look to the page content…

<figure><img src="/files/mEvHj7HsvVDCfzOh1GxS" alt=""><figcaption></figcaption></figure>

The post says that the only user in the blog is `Prisonmike`, but another user (`nick`) replied telling him that he has secret information in the blog drafts. If we gain access to the administration panel we should take a look to the drafts.

There is nothing interesting in the other 2 post available, but we can find other 2 posts if we click on `Search` button:

<figure><img src="/files/CC0XaZi4CmvORIL5xaeD" alt=""><figcaption></figcaption></figure>

A simple test post and another one of Nick reminding him to not write secrets in the drafts.

We didn’t found anything that could be a password for Prisonmike user, so let’s try to login with default credentials:

<figure><img src="/files/NnQtUf22cA93gKuRnu69" alt=""><figcaption></figcaption></figure>

`admin` is not a valid user, but `prisonmike` is. But we still don’t know the password.

<figure><img src="/files/2exM3aJKXxFIxCeEiItt" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/BgxDM7IuoRapa0SFc9Yn" alt=""><figcaption></figcaption></figure>

Using searchsploit I found a exploit that seems capable of view unauthenticated posts…

<figure><img src="/files/zpapnX0E5II0AEQPSzQ3" alt=""><figcaption></figcaption></figure>

Let’s try it!

<figure><img src="/files/BPsAsiWcXJnOHzX9Dfbw" alt=""><figcaption></figcaption></figure>

So, yeah, we have access to the draft posts contents… There is one with a “secret” url that seems interesting… Let’s add `chat.office.paper` to /ect/hosts file and visit it with the web-browser

<figure><img src="/files/pNpRKvsV2xg5bTCtUyBw" alt=""><figcaption></figcaption></figure>

It is a register page, let’s register a new user:

<figure><img src="/files/XBJAxNFyTps9RBT0BcvK" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/NTXfIADxXAnwyUV1HD7h" alt=""><figcaption></figcaption></figure>

Automatically I get invited to a chat:

<figure><img src="/files/RsZtsNZPQJtbdItmDA7n" alt=""><figcaption></figcaption></figure>

Let’s take a look to the chat messages:

<figure><img src="/files/oKUXfWmjirqznEPqgxoo" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/9MUL5dMk6uPxmuNn00EG" alt=""><figcaption></figcaption></figure>

So, let’s open a private chat with Recyclops and see if we can enumerate something:

<figure><img src="/files/e1ib3yYCfRId7NHP9igI" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/vQyuTcfxQQKtat3Xk79f" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/Zo19GOwNQtVXkk0zvjhq" alt=""><figcaption></figcaption></figure>

Let’s see if it’s vulnerable to path traversal:

<figure><img src="/files/lxnlxCObr42PWahVdGSn" alt=""><figcaption></figcaption></figure>

Yep, it is… and we should have access to user flag this way:

<figure><img src="/files/czNMPDcrFoDYzXEIGOB9" alt=""><figcaption></figcaption></figure>

Not that easy… yep, it is only readable by the owner… there will a ssh key?

<figure><img src="/files/DKzVCgn4yU1bNkBzHQ52" alt=""><figcaption></figcaption></figure>

Nope… but the .hubot\_history sounds interesting:

<figure><img src="/files/JKeXwqUlb6yBWNBl8K9v" alt=""><figcaption></figcaption></figure>

There is a connect command? I tried to use it, but it doesn’t seems to work.

<figure><img src="/files/ZnMKnLRdHRIKdVh2pFE9" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/i9rRJkIyxNoJ5bcrEAj0" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/N43E56RBvnJNnCob40qp" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/jqGq7Va0R7nBLomyL9rv" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/00rsuANfesE9yGTDQxnX" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/KhXKUfbl9yinjF6gSkXi" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/s5XgilczYPWdUahhhCpL" alt=""><figcaption></figcaption></figure>

woah, we found credentials: `recyclops:Queenofblad3s!23`

Let’s see if we can login as recyclops in the chat:

<figure><img src="/files/V8qaMCbuA9IdD9hvRUYL" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/C3ezU8eewEQlVU6p7XJq" alt=""><figcaption></figcaption></figure>

Nope, we can’t… Recyclops is a bot made by Dwight… Will him be reusing credentials? Let’s check it via ssh:

<figure><img src="/files/NDFQ71MaqjuGCTUQbmhA" alt=""><figcaption></figcaption></figure>

Yeah!

<figure><img src="/files/afBZxGhvjRYSajReCq2M" alt=""><figcaption></figcaption></figure>

Escalation

i.sh

<figure><img src="/files/m06ssCCnNG4AXmH0TLJn" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/tnb9QwFc7AkUfpk450Co" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/fugaX9KaK1s9h4HdMNLZ" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/7BHLOyRFuOr0sA75W25x" alt=""><figcaption></figcaption></figure>


---

# 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:

```
GET https://angellm.gitbook.io/hacknotes/htb/2022/paper.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
