FTP 21

checklist

  • Anonymous login

  • OS version

  • Other software: Check Program Files, yum.log, /bin

  • Password files

  • DLLs: Use for msfpescan / BOF targets

  • Upload potential: Do you have the ability to upload files?

  • Can you trigger execution of uploads?

  • Swap binaries

  • Public exploits: Check for any public exploits for FTP server software

Download All Directories and Files

  1. Mirror FTP directories with anonymous login:

    wget --mirror 'ftp://ftp_user:redcliff@10.10.10.59'
  2. If PASV transfer is disabled:

wget --no-passive-ftp --mirror 'ftp://anonymous:anonymous@10.10.10.98'
  1. If PASV is enabled:


FTP Information Gathering

  1. Grab FTP Banner via telnet:

  2. Grab FTP Certificate if available:

  3. Nmap FTP scan:

    • Scan FTP with scripts:

    • Basic FTP scan with version detection:

    • Alternative (without brute forcing):

  4. Connect with Browser:


Brute Force FTP Login

  1. Hydra Brute Force (Need Username):

  2. Hydra with Sparta custom list (Requires Sparta tool):

  3. Msfconsole FTP scanning:


SSH Key Deployment via FTP

  1. Generate SSH key:

  2. Upload SSH key via FTP:

  3. SSH into target:

FTP Passive Mode Detection

  • Passive mode at login: Indicates potential presence of a firewall in the system.


Exploiting MS Office Evil Macros

First Stage: Set up Reverse Shell

  1. Search for Office macro:

  2. Set up Meterpreter reverse listener:

Second Stage: Upload and Execute Macro

  1. Change file extension:

  2. Start Meterpreter listener:

  3. Upload via FTP:

  4. Catch Meterpreter session.

Last updated