NetScreen Snoop Command

对于数据包的截取,使用linux中的netfilter钩子函数 netfilter可以过滤数据包,也就对数据包经行了截获,它通过调用内核网络代码中的一些hook函数完成所需要的工作。 而当一个当数据包游历Linux内核的网络堆栈时,它穿过了几个hook点,在这里,数据包可以被分析并且选择是保留还是丢弃,这些hook点就是Netfilter hook。   而钩子函数(回调函数)也是系统内核为驱动程序提供的一些特定的函数,在驱动程序中某个变量的状态发生改变 阅读详情

NetScreen Snoop Command

A useful tool for troubleshooting data flow problems through a NetScreen firewall is the snoop command. From a command line interface (CLI) you can enter snoop ? to see options for this command. The command will not provide detailed information on the actions the firewall is taking on packets flowing through it - for that you need to use the debug command - but it will allow you to see what data is flowing through the firewall.

ns5gt-> snoop ?
<return>
detail               snoop detail configuration
filter               snoop filter configuration
info                 show snoop information
off                  turn off snoop
ns5gt-> snoop info
Snoop: OFF
Filters Defined: 0, Active Filters 0
Detail: OFF, Detail Display length: 96

By default snoop sends its output to the dbug buffer rather than the console. If that setting has been changed, you can use set console dbuf to set it to the default value.

The first step in using snoop is to create a filter so that you see only the pertinent data, unless you want to see everything. In the example below, the filter is set to show all data flowing through the firewall between 72.81.210.154 and 192.168.2.3 in both directions. The debug buffer, where the data will be captured, is then cleared and snoop is started.

ns5gt-> snoop filter ip src-ip 72.81.210.154 dst-ip 192.168.2.3 direction both
snoop filter added
ns5gt-> clear dbuf
ns5gt-> snoop
Start Snoop, type ESC or 'snoop off' to stop, continue? [y]/n y

The snoop filter options are as follows:

ns5gt-> snoop filter ?
delete               delete snoop filter
ethernet             snoop specified ethernet
id                   snoop filter id
ip                   snoop ip packet
off                  turn off snoop filter
on                   turn on snoop filter
tcp                  snoop tcp packet
udp                  snoop udp packet

The options for setting an IP filter for snoop are as follows:

ns5gt-> snoop filter ip ?
<return>
direction            snoop direction
dst-ip               snoop filter dst ip
dst-port             snoop filter dst port
interface            interface name
ip-proto             snoop filter ip proto
port                 src or dst port
src-ip               snoop filter src ip
src-port             snoop filter src port
<a.b.c.d>            IP Address
offset               ip offset

You can view the status of snoop and see filter information with snoop info.

ns5gt-> snoop info
Snoop: ON
Filters Defined: 1, Active Filters 1
Detail: OFF, Detail Display length: 96
Snoop filter based on:
id 1(on): IP src-ip 72.81.210.154 dst-ip 192.168.2.3 dir(B)

You can use get dbuf to view the information captured in the debug buffer.

dbuf

get dbuf <arguments>
info        show debug buffer info
mem         show debug buffer memory content
stream      show debug buffer stream

This allows you to view console messages that have been redirected to a debug buffer above.

set dbuf size <size>

Increase the size of the dbuf buffer from the default of 32k.

ns5gt-> get dbuf info
count: 6515, last index: 6515, cur index: 0, size: 32768
start: 0, pause: 0
ns5gt-> get dbuf mem
====6515
32 39 36 35 36 37 2e 30 3a 20 32 28 6f 29 3a 30     296567.0:.2(o):0
30 31 30 64 62 37 64 32 38 36 32 2d 3e 30 30 31     010db7d2862->001
37 33 66 34 34 39 37 35 31 2f 30 38 30 30 0d 0a     73f449751/0800..
20 20 20 20 20 20 20 20 20 20 20 20 20 20 37 32     ..............72
2e 38 31 2e 32 31 30 2e 31 35 34 2d 3e 31 39 32     .81.210.154->192
2e 31 36 38 2e 32 2e 33 2f 36 2c 20 74 6c 65 6e     .168.2.3/6,.tlen
3d 35 32 0d 0a 20 20 20 20 20 20 20 20 20 20 20     =52.............
<text snipped>
ns5gt-> get dbuf stream
296567.0: 2(o):0010db7d2862->00173f449751/0800
              72.81.210.154->192.168.2.3/6, tlen=52
              vhl=45, tos=00, id=32447, frag=4000, ttl=51
              tcp:ports 22->2892, seq=970501524, ack=2243777306, flag=8012/SY
N

296568.0: 2(o):0010db7d2862->00173f449751/0800
              72.81.210.154->192.168.2.3/6, tlen=61
              vhl=45, tos=00, id=32448, frag=4000, ttl=51
	      tcp:ports 22->2892, seq=970501525, ack=2243777306, flag=5018

When you are paging through the display of the debug buffers contents after entering the get dbuf mem or get dbuf stream, which can be abbreviated to get db str, commands, you will see --- more --- displayed. If you type q you can stop the display of information.

If you want to store the contents of the buffer elsewhere for analysis, you can send the buffer's contents to a Trivial File Transfer Protocol (TFTP) server. In the example, below the buffer is sent to a file named netscreen.log on a TFTP server witth IP address 192.168.0.15. For further information on sending log data to a TFTP server, see Send NetScreen Traffic Log to a TFTP Server.

ns5gt-> get dbuf stream > tftp 192.168.0.15 netscreen.log
redirect to 192.168.0.15,netscreen.log
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
tftp transferred records = 65
tftp success!

By default, snoop will only capture the headers of packets, i.e. 96 bytes. It won't capture the entire packet. If you want to capture the entire packet, you will need to use snoop detail len, where len specifies the amount of data in bytes you wish to capture for each packet.

ns5gt-> snoop detail ?
<return>
len                  snoop detail length
off                  turn off snoop detail
ns5gt-> snoop detail len ?
<number>             packet length to display (range: 1 - 1514)

If you just use snoop detail, you will get the default length of 96 bytes. So specify the maximum length, if you want to capture the entire packet.

ns5gt-> snoop info
Snoop: OFF
Filters Defined: 0, Active Filters 0
Detail: ON, Detail Display length: 96
ns5gt-> snoop detail
ns5gt-> snoop info
Snoop: OFF
Filters Defined: 0, Active Filters 0
Detail: ON, Detail Display length: 96
ns5gt-> snoop detail len 1514
ns5gt-> snoop info
Snoop: OFF
Filters Defined: 0, Active Filters 0
Detail: ON, Detail Display length: 1514

If you wish to remove the filters you've created you can use the command snoop filter delete. You can disable snoop with snoop off.

ns5gt-> snoop off
Snoop off
ns5gt-> snoop info
Snoop: OFF
Filters Defined: 1, Active Filters 1
Detail: OFF, Detail Display length: 96
Snoop filter based on:
id 1(on): IP src-ip 72.81.210.154 dst-ip 192.168.2.3 dir(B)
ns5gt-> snoop filter delete
All filters removed
ns5gt-> snoop info
Snoop: OFF
Filters Defined: 0, Active Filters 0
Detail: OFF, Detail Display length: 96

If you want to delete only a specific filter rather than all filters you can use snoop filter id <number> where <number> is the filter id.

ns5gt-> snoop info
Snoop: OFF
Filters Defined: 2, Active Filters 2
Detail: ON, Detail Display length: 96
Snoop filter based on:
id 1(on): IP src-ip 192.168.2.3 dir(B)
id 2(on): IP src-ip 192.168.2.3 proto 17 dir(B)
ns5gt-> snoop filter id 1 delete
Filter id 1 removed
ns5gt-> snoop info
Snoop: OFF
Filters Defined: 1, Active Filters 1
Detail: ON, Detail Display length: 96
Snoop filter based on:
id 1(on): IP src-ip 192.168.2.3 proto 17 dir(B)

If I was interested in any UDP traffic from source address 72.81.210.154 to any destination address on port 27900, I could clear the debug buffer of any data already in it, delete any existing filters, and set the filter as shown below. The IP protocol number for UDP is 17, so I use that value for ip-proto to filter on just UDP traffic.

ns5gt-> snoop filter delete
All filters removed
ns5gt-> clear dbuf
ns5gt-> snoop filter ip src-ip 72.81.210.154 dst-port 27900 ip-proto 17
snoop filter added
ns5gt-> snoop info
Snoop: OFF
Filters Defined: 1, Active Filters 1
Detail: OFF, Detail Display length: 96
Snoop filter based on:
id 1(on): IP src-ip 72.81.210.154 dst-port 27900 proto 17 dir(B)
ns5gt-> snoop
Start Snoop, type ESC or 'snoop off' to stop, continue? [y]/n y
ns5gt-> get dbuf stream
305728.0: 1(i):001d70cce905->0010db7d2861/0800
              72.81.210.154->10.45.13.244/17, tlen=35
              vhl=45, tos=00, id=35246, frag=0000, ttl=52
              udp:ports 3040->27900, len=15

ns5gt-> get dbuf mem
====209
33 30 35 37 32 38 2e 30 3a 20 31 28 69 29 3a 30     305728.0:.1(i):0
30 31 64 37 30 63 63 65 39 30 35 2d 3e 30 30 31     01d70cce905->001
30 64 62 37 64 32 38 36 31 2f 30 38 30 30 0d 0a     0db7d2861/0800..
20 20 20 20 20 20 20 20 20 20 20 20 20 20 37 32     ..............72
2e 38 31 2e 32 31 30 2e 31 35 34 2d 3e 31 30 2e     .81.210.154->10.
34 35 2e 31 33 2e 32 34 34 2f 31 37 2c 20 74 6c     45.13.244/17,.tl
65 6e 3d 33 35 0d 0a 20 20 20 20 20 20 20 20 20     en=35...........
20 20 20 20 20 76 68 6c 3d 34 35 2c 20 74 6f 73     .....vhl=45,.tos
3d 30 30 2c 20 69 64 3d 33 35 32 34 36 2c 20 66     =00,.id=35246,.f
72 61 67 3d 30 30 30 30 2c 20 74 74 6c 3d 35 32     rag=0000,.ttl=52
0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20     ................
75 64 70 3a 70 6f 72 74 73 20 33 30 34 30 2d 3e     udp:ports.3040->
32 37 39 30 30 2c 20 6c 65 6e 3d 31 35 0d 0a 0d     27900,.len=15...
0a                                                  .

Scripts to allow you to view NetScreen snoop packet capture information wtih other sniffer tools, such as WireShark, formerly known as Ethereal, are available at NetScreen snoop output to pcap [not tested].

If you need to see how the firewall is processing packets and applying policies to them, you can use the debugging commands instead.

References:

  1. Netscreen Snoop Command
    Scribd
  2. ScreenOS Hidden Commands Revealed
    By: Stephen Gill
    Version: 4.01
    Published: December 10, 2002
    Stephen Gill's home on cymru.com.
  3. NetScreen snoop output to pcap
    By: Florent
    Date: January 11, 2006
    NETwork Security Consortium
  4. ScreenOS: Analyze traffic
    By: Earthbreaker
    Date: February 21, 2009
    Codesnake
商BC1590年世界历史地图矢量文件SHP格式.zip 本资源为《商BC1590年世界历史地图矢量文件SHP格式》压缩包,文件大小约 17.96 MB,便于集中下载、整理和使用。具体内容请结合压缩包内的实际文件与说明查看。 在当前可读取的目录中,可见属性表(.dbf)、投影说明文件(.prj)、Shapefile 主文件(.shp)、Shapefile 索引(.shx)。建议解压后保持原有目录结构,先浏览文件清单与说明,再选择需要的资料进行加载或整理。 应用方面,可根据实际资料用于学习练习、资料检索、研究整理或项目参考。使用时可先确定所需内容,建立清晰的文件分类,再按项目要求进行筛选、转换与汇总。 使用 Shapefile 数据时,请把实际配套的 .shp、.shx、.dbf 等文件保存在同一目录,并保持同名关联;加载后再检查坐标系与中文字段显示。如需叠加其它数据,请先统一坐标与字段口径。 数据来源、时间范围、坐标系、字段定义、精度和使用条件,请以实际文件及原始说明为准。本介绍不对文件名之外尚未核实的信息作额外承诺。 立即下载

相关推荐

DeepSeek智慧政务数字政府AI大模型微调设计方案.docx

DeepSeek智慧政务数字政府AI大模型微调设计方案.docx

NetScreen ScreenOS troubleshooting 之 Snoop

NetScreen ScreenOS troubleshooting 之 SnoopNetScreen ScreenOS troubleshooting 之 Snoopsnoop:在<span class="t_tag" onclick="function onclick(){tagshow(event)}">防火墙的接口上抓包,可以根据具体接口, 数据包的src-ip,src-p

瞎几把学 984

大型央企十五五企业级数据编织(Data Fabric)架构与主动元数据管理平台初步设计方案.docx

大型央企十五五企业级数据编织(Data Fabric)架构与主动元数据管理平台初步设计方案.docx

Linux Shell编程中的几个特殊符号命令 & 、&& 、 ||

& 放在启动参数后面表示设置此进程为后台进程 默认情况下,进程是前台进程,这时就把Shell给占据了,我们无法进行其他操作,对于那些没有交互的进程,很多时候,我们希望将其在后台启动,可以在启动参数的时候加一个’&’实现这个目的。

瞎几把学 2万+

圆铝杆:电网升级与高性能合金打开圆铝杆市场增长新空间.docx

圆铝杆:电网升级与高性能合金打开圆铝杆市场增长新空间

集团长任务Agent稳定性测试与故障恢复能力建设平台建设方案.docx

集团长任务Agent稳定性测试与故障恢复能力建设平台建设方案.docx

Cisco show 命令

<br />Show access-lists 显示当前所有ACL的内容 <br />Show buffers 显示缓存器统计信息 <br />Show cdp entry 显示CDP表中所列相邻设备的信息 <br />Show cdp interface 显示打开的CDP接口信息 <br />Show cdp neighbors 显示CDP查找进程的结果 <br />Show dialer 显示为DDR(数字数据接受器)设置的串行接口的一般诊断信息 <br />Show flash 显示闪存的布局和内容信

瞎几把学 7297

低空经济运营体系构建与实施路径规划方案.docx

低空经济运营体系构建与实施路径规划方案.docx

linux 函数hook实现数据包过滤基本框架

#include  #include  #include  #include  /* 用于注册我们的函数的数据结构 */ static struct nf_hook_ops nfho; /* 注册的hook函数的实现 */ unsigned int hook_func(unsigned int hooknum,                        struct s

瞎几把学 1573

城市生命线之长距离输水管线的监测与检测.docx

城市生命线之长距离输水管线的监测与检测.docx

集团IT运维智能体(AIOps Agent)自主故障诊断与自愈平台详细设计方案.docx

集团IT运维智能体(AIOps Agent)自主故障诊断与自愈平台详细设计方案.docx

Alcatel-Lucent 命令记录

show ip service 用来显示开放端口服务情况。 show ip interface 用来显示网络IP地址情况 show system  用来显示系统信息

瞎几把学 1520

【工业无线通信】5GHz全频段大功率AP基站:支持TDMA抗干扰与AI漫游的工业级无线覆盖解决方案设计

内容概要:本文介绍了一款型号为WFS7000XBE-RY的工业级大功率无线AP基站,工作于5GHz全频段(4920-6100MHz),支持300Mbps无线速率和29dBm(0.8瓦)发射功率,采用TDMA时分多址与私有协议技术,实现10台以上基站同频共存、移动中不丢包、通信延迟≤1ms。设备具备IP54防护等级,支持-45~85°C宽温运行,适用于复杂工业环境,提供2km覆盖距离或外接高增益天线实现100km以上桥接。支持多种工作模式与网络功能,如AI FastRoaming极速漫游(切换延迟≤30ms)、QoS、VLAN、MPLS等,确保稳定可靠的无线连接。; 适合人群:工业物联网、智能物流、自动化控制领域的工程师和技术人员,以及需要高稳定性无线通信解决方案的研发与部署人员。; 使用场景及目标:①用于智慧物流、工业4.0、AMR/AGV/RGV小车、四向穿梭车、堆垛机、无人机叉车等移动设备的无线联网;②满足风电监测、室内外无线桥接、车载船载视频传输等远距离、高抗干扰通信需求;③替代传统滑触线和光纤布线,实现免布线、高灵活性的无线数据传输。; 阅读建议:本文适用于关注工业无线通信性能与可靠性的技术人员,建议结合实际部署场景参考其硬件规格、环境适应性和组网能力进行系统设计与选型。

ScreenOS Hidden Commands Revealed

ScreenOS Hidden Commands RevealedVersion 4.01, 12/10/2002           Stephen Gill E-mail: gillsr@cymru.comPublished: 12/10/2002            

瞎几把学 1155

01、【solidworks】windosws正在配置solidworks问题及注册表未卸载干净问题解决

windosws正在配置solidworks问题及注册表未卸载干净问题解决

qq_740388770的博客 2万+

Unity手游优化实战:用GPU Instancing把草地渲染的DrawCall从8000降到20(附完整Shader)

本文详细介绍了Unity手游中利用GPU Instancing技术优化草地渲染的实战方法,将DrawCall从8000降至20。通过Shader改造和性能优化技巧,开发者可以在移动端实现高效渲染,显著提升游戏性能。文章包含完整的Shader代码和优化策略,适合Unity开发者学习应用。

weixin_33691817的博客 496

AboCom firmware

http://www.abocom.com.tw/download_show.aspx?ptype=66395a7ea68b3cb8a3e548690eb0df8a&id=163390C39B03E84E0BD6612F82E7DA11download the firmware

瞎几把学 920

[PCIe5.0] 5.3.1.4.2 D3Cold State

主电源(Vcc)完全断开,仅保留极少量辅助电源(Vaux)用于维持基本唤醒功能设备功能完全关闭,所有寄存器状态丢失(除非有特殊存储)需要完全重新初始化才能恢复工作比D3Hot状态功耗更低,但唤醒延迟更长。

系统固件工程师 457

Linux Shell 编程中需要注意的几个知识点

Shell编程中需要注意的几个知识点 1、程序必须以下面的行开始(必须方在文件的第一行): #!/bin/bash 符号#!用来告诉系统它后面的参数是用来执行该文件的程序。在这个例子中我们使用/bin/sh来执行程序。 当编辑好脚本时,如果要执行该脚本,还必须使其可执行。 2、运行脚本前需要修改脚本为可执行     编译 chmod +x filename 这样才能用./filenam

瞎几把学 892

Z-Image Turbo随机性增强插件的下载教程及使用方法 z-image生成图像太相似怎么办 Z-Image Turbo 整合包下载

Z-Image Turbo 是出了名的“seed 不敏感”,非常难做多样化图像创作。ComfyUi-ConditioningNoiseInjection 插件通过在conditioning(提示词编码)阶段加入可控噪声,成功解决了 Turbo 随机性不足的问题。它不仅能让 Turbo 产生更丰富的构图差异,还能保持主题稳定,是目前我测试过最有效的 Turbo 随机性增强工具。

代码简单说 Vue、JAVA、PHP、Node.js 熟练运用,接口、架构、性能全搞定。 2017

AI大模型:(三)3.9 Deep Agents实现Agent

DeepAgents是基于LangChain的智能体框架,专为复杂长期任务设计。其通过分层架构解决传统局限,提供智能规划、虚拟文件系统、权限控制、任务委派、上下文管理、人机协同、模型适配及技能系统八大核心功能。相比基础LangChain,它内置状态持久化、流式处理和子智能体调度,显著提升可靠性与自主性。典型应用涵盖自动化编程、复杂业务流程编排及持续学习型研究助手。该框架支持多智能体协作,具备路由分发与动态技能加载能力,适用于需高自主性与安全控制的AI场景,有效实现从代码分析到人工审批的全流程自动化管理。

haylee的专栏 456

Linux输入输出重定向

linux shell下常用输入输出操作符是: 1.  标准输入   (stdin) :代码为 0 ,使用 /proc/self/fd/0   0代表:/dev/stdin  2.  标准输出   (stdout):代码为 1 ,使用 > 或 >> ; /dev/stdout -> /proc/self/fd/1  1代表:/dev/stdout 3.  标准错误输出(stderr):

瞎几把学 744

全网详细解决Client does not support authentication protocol requested by server;consider upgrading Mysql c

全网详细解决1251 - Client does not support authentication protocol requested by server; consider upgrading Mysql client。

念兮为美 5487
上一篇: Using the mtrace from-source Command
下一篇: ScreenOS Hidden Commands Revealed
hack8
博客等级 码龄18年 109粉丝 128原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址