Working with embedded devices, I end up using TFTP quite a bit. While most operating systems offer TFTP clients, they tend to be a bit archaic and lack simple features that we hacker types might find useful. So of course, I rolled my own.
Uploading file ‘foo’ to ‘/tmp/bar’:$ tfcp ./foo.txt 192.168.1.1:/tmp/bar
Downloading ‘/tmp/bar’ to your current working directory:$ tfcp 192.168.1.1:/tmp/bar .
There are two key features that I like about tfcp:
- It is non-interactive, which means it’s easily scriptable and all tfcp commands get stored in your command history
- It allows you to specify both the local and remote file names
Although these are simple, seemingly innocuous features, they are severely lacking in most TFTP client utilities, and as we’ll soon see, they can be key features when analyzing/exploiting embedded systems.