Protocol Specifics Attacks

Brute Forcing

Let us explore one of them, Medusa. With Medusa, we can use the option -u to specify a single user to target, or you can use the option -U to provide a file with a list of usernames. The option -P is for a file containing a list of passwords. We can use the option -M and the protocol we are targeting (FTP) and the option -h for the target hostname or IP address.

<aside> 💡

Although we may find services vulnerable to brute force, most applications today prevent these types of attacks. A more effective method is Password Spraying.

</aside>

medusa -u fiona -P /usr/share/wordlists/rockyou.txt -h 10.129.203.7 -M ftp 

./configure

make

make install

make clean./configure

https://github.com/lanjelot/patator

FTP Bounce Attack

An FTP bounce attack is a network attack that uses FTP servers to deliver outbound traffic to another device on the network. The attacker uses a PORT command to trick the FTP connection into running commands and getting information from a device other than the intended server.

Consider we are targetting an FTP Server FTP_DMZ exposed to the internet. Another device within the same network, Internal_DMZ, is not exposed to the internet. We can use the connection to the FTP_DMZ server to scan Internal_DMZ using the FTP Bounce attack and obtain information about the server's open ports. Then, we can use that information as part of our attack against the infrastructure.

image.png

The Nmap -b flag can be used to perform an FTP bounce attack:

nmap -Pn -v -n -p80 -b <anonymous:password@10.10.110.213> 172.17.0.2

Modern FTP servers include protections that, by default, prevent this type of attack, but if these features are misconfigured in modern-day FTP servers, the server can become vulnerable to an FTP Bounce attack.

robin:7iz4rnckjsduza7