githubEdit

Pentesting TFTP

Port: UDP 69

TFTP (Trivial File Transfer Protocol) is a simple file transfer protocol with no authentication. Often used for network device configs, PXE boot, etc.


Discovery

# UDP scan
nmap -sU -p 69 $ip

# Service version
nmap -sU -p 69 -sV $ip

Enumeration with Nmap Scripts

File Enumeration

# Enumerate common files (default wordlist)
nmap -sU -p 69 --script=tftp-enum $ip

Output:

69/udp open  tftp
| tftp-enum: 
|_  ciscortr.cfg

Version Detection

Custom Wordlist

Common Files to Check


Manual Interaction

TFTP Client

Netcat (Raw)

TFTP Opcodes

Opcode
Operation

01

Read Request (RRQ)

02

Write Request (WRQ)

03

Data

04

Acknowledgment

05

Error


File Upload (If Writable)

Exploitation

If TFTP is writable and serves web directory:

  1. Upload webshell

  2. Access via HTTP


Metasploit


Config File Analysis

Network device configs often contain:

  • Usernames/passwords (sometimes plaintext or Type 7)

  • SNMP community strings

  • VPN pre-shared keys

  • Network topology info

  • Domain names/hostnames

Cisco Type 7 Password Decryption


Common TFTP Software

Software
Notes

atftpd

Linux, common

tftpd-hpa

Linux

Netkit tftpd

Linux

SolarWinds TFTP

Windows

Cisco TFTP

Network devices

Last updated