日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

ASA对FTP的审查抓包测试

發布時間:2024/4/13 编程问答 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 ASA对FTP的审查抓包测试 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
一.概述: 聽了yeslab的秦珂老師的ASA視頻,說PAT時,FTP服務器在Outside,FTP客戶端在Inside,這種情況主動FTP能正常工作是因為:ftp審查可以使得穿越PAT時FTP能正常工作(修改了FTP應用層的數據),并且使得FTP主動模式下從Outside主動向Inside發起的包能夠順利通過防火墻。因為在路由器上配置PAT,FTP也能正常工作,因此打算測試一下,到底是FTP審查使得PAT能正常工作,還是ASA自身的PAT就能使得PAT能正常工作。
二.測試思路及結論: A.關閉ASA的FTP審查,確認FTP被動模式是否能正常工作 ----能正常工作,FTP被動模式都由Inside的FTP客戶端主動發起,防火墻不需要放行策略的FTP審查就能正常工作 B.關閉ASA的FTP審查,Inside路由器作為FTP客戶端設置為主動模式,確認FTP主動模式是否能正常工作 ----不能正常工作,通過抓包可以發現,Outside接口FTP服務器收到的FTP客戶端的發送的FTP應用層的數據中IP沒有被更改,FTP服務器主動去連接PAT之前的地址,導致連接無法建立 ----進一步確認了老師講課所說的是正確的 三.測試拓撲: 四.基本配置: A.FTP服務器 ip:202.100.1.1/24 開啟3CDamon,并配置FTP服務器 B.ASA842防火墻: ①接口配置 interface GigabitEthernet0
nameif Outside
security-level 0
ip address 202.100.1.10 255.255.255.0
no shut
interface GigabitEthernet1
nameif Inside
security-level 100
ip address 10.1.1.10 255.255.255.0
no shut、 ②全局policy map修改: ----關閉FTP審查,并且啟用icmp審查 policy-map global_policy class inspection_default no inspect ftp inspect icmp ③PAT配置: object network Inside_net subnet 10.1.1.0 255.255.255.0 nat (inside,outside) dynamic interface C.Inside路由器: ①接口配置: interface Ethernet0/0 ip address 10.1.1.1 255.255.255.0
no shut ②默認路由配置: ip route 0.0.0.0 0.0.0.0 10.1.1.10 ③FTP用戶名和密碼配置: ip ftp username xll
ip ftp password 1234qwer,
五.測試步驟: A.關閉FTP審查后,被動FTP能正常工作 ①被動FTP能正常傳文件 Inside#copy ftp: flash:
Address or name of remote host [202.100.1.1]?
Source filename [202.100.1.1]? xx.txt
Destination filename [xx.txt]?
%Warning:There is a file already existing with this name
Do you want to over write? [confirm]
Accessing ftp://202.100.1.1/xx.txt...
Erase flash: before copying? [confirm]
Erasing the flash filesystem will remove all files! Continue? [confirm]
Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ...erased
Erase of flash: complete
Loading xx.txt
[OK - 24/4096 bytes]

Verifying checksum... OK (0x8A8A)
24 bytes copied in 6.820 secs (4 bytes/sec)
Inside#
②Inside路由器接口抓包:
③Outside接口FTP服務器上面抓包:
B.關閉FTP審查后,主動FTP不能正常工作: ①Inside路由器設置FTP客戶端為主動模式: (config)#no ip ftp passive ②主動FTP無法正常工作: Inside#copy ftp: flash:
Address or name of remote host [202.100.1.1]?
Source filename [202.100.1.1]? xx.txt
Destination filename [xx.txt]?
%Warning:There is a file already existing with this name
Do you want to over write? [confirm]
Accessing
ftp://202.100.1.1/xx.txt... ③Inside路由器接口抓包:
④Outside的FTP服務器抓包: ---從抓包中,確實可以看到,如果不開啟FTP審查的話,ASA不會修改FTP應用層的IP地址,因為FTP服務器收到FTP客戶端告訴給它的地址為內網PAT前的地址,導致FTP服務器無法連接。 C.開啟FTP審查后,被動FTP能正常工作: ①ASA防火墻開啟FTP審查: policy-map global_policy
class inspection_default
inspect ftp ②被動FTP能正常工作: Inside#copy ftp: flash:
Address or name of remote host []? 202.100.1.1
Source filename []? xx.txt
Destination filename [xx.txt]?
%Warning:There is a file already existing with this name
Do you want to over write? [confirm]
Accessing ftp://202.100.1.1/xx.txt...
Erase flash: before copying? [confirm]
Erasing the flash filesystem will remove all files! Continue? [confirm]
Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ...erased
Erase of flash: complete
Loading xx.txt
[OK - 24/4096 bytes]

Verifying checksum... OK (0x8A8A)
24 bytes copied in 1.788 secs (13 bytes/sec)
③Inside路由器接口抓包:
④Outside的FTP服務器抓包:
----從抓包接口來看,確實因為開啟FTP審查,ASA修改了FTP應用層的數據,將IP地址和端口進行了修改。


本文轉自 碧云天 51CTO博客,原文鏈接:http://blog.51cto.com/333234/1304633,如需轉載請自行聯系原作者

總結

以上是生活随笔為你收集整理的ASA对FTP的审查抓包测试的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。