# TFTP

Enum with Nmap:

```
$ sudo nmap -sVU -p69 --script tftp-enum 10.10.13.37
```

## Brute Force Filenames

Make a list of potential filenames. Use 8.3 notation:

```
PS > cmd /c dir /x
PS > cmd /c "for %I in (.) do @echo %~sI"
```

Download Python TFTP implementation and use the Bash script below:

* <https://github.com/m4tx/pyTFTP>

```
$ git clone https://github.com/m4tx/pyTFTP && cd pyTFTP
$ ./tftp-brute.sh 10.10.13.37 files.txt
```

{% code title="tftp-brute.sh" %}

```bash
 #!/usr/bin/env bash

IP=$1
FILES=$2

while IFS= read -r file; do
	echo -n "[*] Trying ${file}... "
	if ./client.py -g "${file}" "${IP}" > /dev/null 2>&1; then
		echo "SUCCESS"
	else
		echo "FAIL"
	fi
done < "${FILES}"
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ppn.snovvcra.sh/pentest/infrastructure/tftp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
