# Algernon

## nmap

```
mkdir nmap
sudo rustscan -a 192.168.96.65 --ulimit 5000 -- -T4 -A -oA nmap/all-ports-service-scan
```

A web server is open on port 9998, also an interesting service is on port 17001.

<div align="left"><img src="/files/-MkJXlfwPL3KrUTn7ib7" alt=""></div>

When I open my browser, the website redirects to a log-in page.

![](/files/-MkJYVSP_OBsspNFZLwA)

## Exploitation

The website is running `SmarterMail` and looks like there's a Remote Code Execution vulnerability we can try.

<div align="left"><img src="/files/-MkJZ3Lm0poA5xbXRVc6" alt=""></div>

Let's mirror this exploit to our local machine.

<div align="left"><img src="/files/-MkJZPuNjy8pf4RAy4LY" alt=""></div>

Edit the script, then set the `HOST` variable with the target IP address, set `LHOST` with your local machine IP address, and set `LPORT` to 80

<div align="left"><img src="/files/-MkJZysRulvNUcLmvu36" alt=""></div>

Setup a reverse shell listener on port 80

<div align="left"><img src="/files/-MkJ_FJzvZxagSO1ljhb" alt=""></div>

Execute the following to run the script, `python3 49216.py` and you should received a shell with `nt authority\system` privilege

<div align="left"><img src="/files/-MkJ_gWwgJXISgu4AX2v" alt=""></div>


---

# Agent Instructions: 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://psdon.gitbook.io/hackworld/writeup/proving-grounds-practice/algernon.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.
