39 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{{#include ../banners/hacktricks-training.md}}
# 基本信息
**Trivial File Transfer Protocol (TFTP)** 是一种简单的协议,使用 **UDP 69 端口** 进行文件传输,无需身份验证。根据 **RFC 1350** 的描述,它的简单性意味着缺乏关键的安全特性,导致在公共互联网中的使用有限。然而,**TFTP** 在大型内部网络中被广泛用于向设备(如 **VoIP 电话**)分发 **配置文件****ROM 镜像**,因为它在这些特定场景中的效率。
**TODO**: 提供有关 Bittorrent-tracker 的信息Shodan 用该名称识别此端口)。如果您有更多信息,请在 [**HackTricks telegram group**](https://t.me/peass) 中告诉我们(或在 [PEASS](https://github.com/carlospolop/privilege-escalation-awesome-scripts-suite) 的 GitHub 问题中)。
**默认端口:** 69/UDP
```
PORT STATE SERVICE REASON
69/udp open tftp script-set
```
# 枚举
TFTP 不提供目录列表,因此来自 `nmap` 的脚本 `tftp-enum` 将尝试暴力破解默认路径。
```bash
nmap -n -Pn -sU -p69 -sV --script tftp-enum <IP>
```
## 下载/上传
您可以使用 Metasploit 或 Python 检查您是否可以下载/上传文件:
```bash
msf5> auxiliary/admin/tftp/tftp_transfer_util
```
```bash
import tftpy
client = tftpy.TftpClient(<ip>, <port>)
client.download("filename in server", "/tmp/filename", timeout=5)
client.upload("filename to upload", "/local/path/file", timeout=5)
```
## Shodan
- `port:69`
{{#include ../banners/hacktricks-training.md}}