欢迎关注:1,欢迎关注本博客,你可点击右手边的【QQ邮件订阅】订阅本博客!2,本博客推出江湖救急计划,主要为工作中遇到疑难杂症的兄弟提供远程技术支持和分析,如有需要,请在江湖救急计划页面给我留言!

思科PIX防火墙下抓包方法

作者:易隐者 发布于:2012-2-26 17:42 Sunday 分类:参考资料

命令语法

capture capture_name [type {asp-drop [drop-code] | raw-data | isakmp | webvpn user webvpn-user [url url]}] [access-list access_list_name] [buffer buf_size] [ethernet-type type] [interface interface_name] [packet-length bytes] [circular-buffer][trace trace_count] 

 在版本6.2中首次出现。
 可捕获在ACL中匹配的包。
 可用sniffer软件,如Iris,ethereal,sniffer等打开。
 保存在内存中,缺省512kb,当buffer满的时候会自动停止。

关键步骤:
 在ACL定义感兴趣的数据流。
 将ACL应用到目标接口。

示例

1,先设置感兴趣流量的ACL
access-list cisco_test  permit ip  host 211.91.211.54   host 61.242.223.17
access-list cisco_test  permit ip host 61.242.223.17 host 211.91.211.54
2,抓包
capture in_cap interface inside access-list cisco_test
capture out_cap interface outside access-list cisco_test
3,查看数据包
show capture
show capture in_cap detail
show capture out_cap detail
4,保存数据包
https://61.242.X.X/capture/in_cap/pcap
https://61.242.X.X/capture/out_cap/pcap
注意:确保PIX上启用了http server。

另外的示例

capture pix_dmz_capture_1 access-list tac_capture buffer 10000000 interface dmz

//抓取DMZ接口的数据包,抓包缓存为10000000B,抓包范围为ACL tac_capture,抓包保存的文件名为pix_dmz_capture_1。
capture pix_inside_capture_1 access-list tac_capture buffer 10000000 interface inside

//抓取inside接口的数据包,抓包缓存为10000000B,抓包范围为ACL tac_capture,抓包保存的文件名为pix_inside_capture_1。
no capture pix_dmz_capture_1

//删除抓包文件pix_dmz_capture_1
no capture pix_inside_capture_1

//删除抓包文件pix_inside_capture_1
copy capture:pix_dmz_capture_1 tftp://172.16.1.200/pix_dmz_capture.cap pcap

//将抓包文件pix_dmz_capture_1copy到tftp服务器172.16.1.200上。
copy capture:pix_inside_capture_1 tftp://172.16.1.200/pix_inside_capture.cap pcap

阅读全文>>

标签: 防火墙 ACL 抓包 思科 PIX

评论(0) 引用(0) 浏览(7746)

Powered by 易隐者 基于emlog 皖ICP备12002343号-1