OSCP Cheatsheet
  • Reference List
  • Basic
  • Methodology
    • Basic Scans
    • Service Enumeration
      • TCP: HTTP(S) - 80 / 443
      • TCP: SMB - 139 / 445
      • TCP: FTP - 21
      • TCP/UDP: DNS - 53
      • TCP: SSH - 22
      • TCP/UDP: LDAP - 389 / 636 / 3268
      • TCP/UDP: Kerberos - 88
      • UDP: SNMP - 161
      • TCP: SMTP - 25
      • TCP: RDP - 3389
      • TCP: RPC - 135 / 593
      • TCP: Evil-WinRM - 5985 / 5986
      • TCP: MYSQL - 3306
      • TCP: MSSQL - 1433
      • TCP: Confluence - 8090
    • Extras
  • File Transfer
  • KeePass Database
  • Shells
  • Enumeration
    • Linux
    • Windows
    • Git
  • Privilege Escalation
    • Linux
      • Abusing Cron Jobs
      • Abusing Password Authentication
      • Abusing Setuid Binaries and Capabilities
      • Abusing Sudo
      • Exploits
    • Windows
      • Service Binary Hijacking
      • DLL Hijacking
      • Unquoted Service Paths
      • Scheduled Tasks
      • Exploits
  • Port Forwarding
    • Linux
    • Windows
  • Attacks
    • Public Exploits
    • User Creation
    • Password Cracking
      • Custom Rules
      • Custom Password List
    • Phishing
    • SQLi
  • Active Directory
    • Enumeration
    • Attack
    • Lateral Movement
    • Persistence
Powered by GitBook
On this page
  • Connection
  • Anonymous Login
  • Bruteforce Login
  • Enumeration
  • Nmap
  • Banner Grabbing
  • File Maneuver
  • Downloading Shares
  • Grab Cert
  • Exploit
  1. Methodology
  2. Service Enumeration

TCP: FTP - 21

NOTE: Enter the following for file transfer mode in FTP console

  • passive

  • binary

Connection

Anonymous Login

Username
Password

ftp

ftp

anonymous

anonymous

ftp <Username>@<Target IP Address> [Port]

Bruteforce Login

Using Username List and Password List

hydra -L <Username Lists> -P <Password Lists> -f ftp://<Target IP Address> [-p <Port>]

Using Username and Password

hydra -l <Username> -p <Password> -f ftp://<Target IP Address> [-p <Port>]

Using Username:Password list

hydra -C <Username:Password List> -f ftp://<Target IP Address> [-p <Port>]

Enumeration

Nmap

nmap --script "ftp-anon" -p <Port> <Target IP Address>

Banner Grabbing

nc -nv <Target IP Address> <Port>
nc -sV <Target IP Address> <Port>

File Maneuver

Downloading Shares

wget -m ftp://<Username>:<Password>@<Target IP Address>
wget -m --no-passive ftp://:@<Target IP Address>

NOTE: The above command is to download shares if there is no firewall between you and FTP server

Grab Cert

openssl s_client -starttls ftp -connect <Target IP Address>:<Port>

Exploit

NOTE:

  • Accessing the payload via HTTP would trigger the payload

  • Recommend .asp or .aspx for Mircosoft servers

put <Payload File>
PreviousTCP: SMB - 139 / 445NextTCP/UDP: DNS - 53

Last updated 22 days ago