ASA对FTP的审查抓包测试
生活随笔
收集整理的這篇文章主要介紹了
ASA对FTP的审查抓包测试
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
一.概述: 聽了yeslab的秦珂老師的ASA視頻,說PAT時,FTP服務(wù)器在Outside,FTP客戶端在Inside,這種情況主動FTP能正常工作是因為:ftp審查可以使得穿越PAT時FTP能正常工作(修改了FTP應(yīng)用層的數(shù)據(jù)),并且使得FTP主動模式下從Outside主動向Inside發(fā)起的包能夠順利通過防火墻。因為在路由器上配置PAT,FTP也能正常工作,因此打算測試一下,到底是FTP審查使得PAT能正常工作,還是ASA自身的PAT就能使得PAT能正常工作。
二.測試思路及結(jié)論: A.關(guān)閉ASA的FTP審查,確認FTP被動模式是否能正常工作 ----能正常工作,FTP被動模式都由Inside的FTP客戶端主動發(fā)起,防火墻不需要放行策略的FTP審查就能正常工作 B.關(guān)閉ASA的FTP審查,Inside路由器作為FTP客戶端設(shè)置為主動模式,確認FTP主動模式是否能正常工作 ----不能正常工作,通過抓包可以發(fā)現(xiàn),Outside接口FTP服務(wù)器收到的FTP客戶端的發(fā)送的FTP應(yīng)用層的數(shù)據(jù)中IP沒有被更改,FTP服務(wù)器主動去連接PAT之前的地址,導致連接無法建立 ----進一步確認了老師講課所說的是正確的 三.測試拓撲: 四.基本配置: A.FTP服務(wù)器 ip:202.100.1.1/24 開啟3CDamon,并配置FTP服務(wù)器 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修改: ----關(guān)閉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.關(guān)閉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服務(wù)器上面抓包:
B.關(guān)閉FTP審查后,主動FTP不能正常工作: ①Inside路由器設(shè)置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]
Accessingftp://202.100.1.1/xx.txt... ③Inside路由器接口抓包:
④Outside的FTP服務(wù)器抓包: ---從抓包中,確實可以看到,如果不開啟FTP審查的話,ASA不會修改FTP應(yīng)用層的IP地址,因為FTP服務(wù)器收到FTP客戶端告訴給它的地址為內(nèi)網(wǎng)PAT前的地址,導致FTP服務(wù)器無法連接。 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服務(wù)器抓包:
----從抓包接口來看,確實因為開啟FTP審查,ASA修改了FTP應(yīng)用層的數(shù)據(jù),將IP地址和端口進行了修改。
本文轉(zhuǎn)自 碧云天 51CTO博客,原文鏈接:http://blog.51cto.com/333234/1304633,如需轉(zhuǎn)載請自行聯(lián)系原作者
二.測試思路及結(jié)論: A.關(guān)閉ASA的FTP審查,確認FTP被動模式是否能正常工作 ----能正常工作,FTP被動模式都由Inside的FTP客戶端主動發(fā)起,防火墻不需要放行策略的FTP審查就能正常工作 B.關(guān)閉ASA的FTP審查,Inside路由器作為FTP客戶端設(shè)置為主動模式,確認FTP主動模式是否能正常工作 ----不能正常工作,通過抓包可以發(fā)現(xiàn),Outside接口FTP服務(wù)器收到的FTP客戶端的發(fā)送的FTP應(yīng)用層的數(shù)據(jù)中IP沒有被更改,FTP服務(wù)器主動去連接PAT之前的地址,導致連接無法建立 ----進一步確認了老師講課所說的是正確的 三.測試拓撲: 四.基本配置: A.FTP服務(wù)器 ip:202.100.1.1/24 開啟3CDamon,并配置FTP服務(wù)器 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修改: ----關(guān)閉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.關(guān)閉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服務(wù)器上面抓包:
B.關(guān)閉FTP審查后,主動FTP不能正常工作: ①Inside路由器設(shè)置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]
Accessingftp://202.100.1.1/xx.txt... ③Inside路由器接口抓包:
④Outside的FTP服務(wù)器抓包: ---從抓包中,確實可以看到,如果不開啟FTP審查的話,ASA不會修改FTP應(yīng)用層的IP地址,因為FTP服務(wù)器收到FTP客戶端告訴給它的地址為內(nèi)網(wǎng)PAT前的地址,導致FTP服務(wù)器無法連接。 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服務(wù)器抓包:
----從抓包接口來看,確實因為開啟FTP審查,ASA修改了FTP應(yīng)用層的數(shù)據(jù),將IP地址和端口進行了修改。
本文轉(zhuǎn)自 碧云天 51CTO博客,原文鏈接:http://blog.51cto.com/333234/1304633,如需轉(zhuǎn)載請自行聯(lián)系原作者
總結(jié)
以上是生活随笔為你收集整理的ASA对FTP的审查抓包测试的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 关于Web报表FineReport打印的
- 下一篇: docker-ce私有仓库搭建