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
自动化测试实战项目开发 - 用例发现装载、参数化数据驱动、断言账本、Mock桩与虚拟被测对象、覆盖率统计、结果聚合与报告生成,43源文件185用例 主机侧可跑的自动化测试框架纯源码工程:用例发现与装载 / 参数化与数据驱动 / 断言账本 / Mock 桩与虚拟被测对象 / 覆盖率统计 / 结果聚合与报告生成(43 个 src 源文件 7596 非空行 / 185 用例 1176 断言全绿 / 非真实被测系统实测) 这份资料解决一个很具体的问题:机器上没有真实被测系统,怎么把一套自动化测试框架写对,并且证明它是对的。答案不是先接一堆外部依赖,而是把框架拆成显式、可单测、可主机侧运行的纯源码工程:core 层给出常量、异常、确定性工具、虚拟时钟、数据模型与断言账本,runner 层负责发现、装载、参数化、夹具与执行状态机,mock 层提供 Mock、桩、间谍、补丁与虚拟被测对象,report 层把结果算成覆盖率、聚合、汇总与三种报告,cli 层把四层能力串成四个子命令与二十一项分层自检。全册 43 个 src 源文件里的代码就是这套实现的全部,正文里的每一行都与工程里的文件逐字节一致。 全册 63 个 .py 文件、9,430 个非空行(总行 11,393)分五层再加脚本与测试:core 10 个 2,125 行、runner 11 个 1,804 行、mock 9 个 1,727 行、report 8 个 1,207 行、cli 5 个 733 行、scripts 与 tests 共 20 个 1,834 行。每层都能单独读懂,合起来是一条从「给一组名字做发现」到「装载派生、逐用例执行、收集断言账本、按虚拟被测对象打点算覆盖率、聚合结果、渲染三种报告」的完整链路。所有用例、参数、故障、覆盖率打点都由代码现场构造在内存里,因此同一份工程在任意装有 CPython 3.9 的机器上都能复算出同样的数值。 立即下载

相关推荐

chrome-headless-shell-mac-arm64-160.0.8182.0(Canary).zip

Chrome for Testing 官方测试构建包,内含 Chrome 浏览器、ChromeDriver 与 Chrome Headless Shell,适用于对应平台的自动化测试、Selenium/Playwright 驱动与 CI 环境搭建。解压即用,请按文件名中的平台选择对应版本。

NetScreen ScreenOS troubleshooting 之 Snoop

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

瞎几把学 983

物流卡车运营数据库三年14表8.5万条

本数据集是一家货运卡车公司完整运营数据库的三年模拟数据,2022至2024年跨度的85000多条记录分布在14个相互关联的数据表中,覆盖司机分配、燃油采购、维保计划、交付绩效等运输业务的完整环节,所有表保持规范的外键关系,可直接练习复杂SQL查询、搭建数据管道或开发运营仪表板。数据并非网络抓取或简化教程内容,而是基于12年真实物流行业经验构建的仿真业务库:季节性货运量波动、设备利用率、路线盈利性计算等真实业务模式均有还原,且不受保密协议限制。适合的应用场景:SQL进阶练习(窗口函数、公用表表达式、多表JOIN的真实业务版)、供应链与运输领域的转型分析师作品集项目(每英里成本分析、车队利用率优化、司机绩效评分卡)、物流数据管道与数据仓库建模练习、运营仪表板开发(Power BI、Tableau)、车辆维修需求预测等机器学习建模。对希望进入供应链分析、运输规划领域的数据从业者,这是一套即开即用的行业入门数据。需要说明全部运营数据为按行业规律生成的仿真数据,不对应任何真实企业,用于分析方法练习而非真实经营决策。数据采用MIT开源许可,学习、研究与商业项目均可自由使用。

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

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

瞎几把学 2万+

技术转移行业创新联合体服务市场规模几何?数智化如何重塑成果转化生态.docx

技术转移行业创新联合体服务市场规模几何?数智化如何重塑成果转化生态

传统线下技术撮合中介与基于大数据的数智化平台,哪种更适合当前市场环境?.docx

科易网基于行业知识库+行业大数据+科技资源要素+AI模型,以AI,赋能技术转移、成果转化、技术经理人培训、知识产权管理、区域产业分析与布局、地方科技招商、创新创业大赛等场景,推出科技创新领域的AI工具、场景化服务和数智化解决方案,推动科技创新与产业创新智能化发展。

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 显示闪存的布局和内容信

瞎几把学 7296

地方政府在引进高端创新联合体落地时,通常有哪些税收或土地配套政策?.docx

科易网基于行业知识库+行业大数据+科技资源要素+AI模型,以AI,赋能技术转移、成果转化、技术经理人培训、知识产权管理、区域产业分析与布局、地方科技招商、创新创业大赛等场景,推出科技创新领域的AI工具、场景化服务和数智化解决方案,推动科技创新与产业创新智能化发展。

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

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

瞎几把学 1572

大型国企构建供应链创新联合体,协同研发管理为何仍是瓶颈?.docx

科易网基于行业知识库+行业大数据+科技资源要素+AI模型,以AI,赋能技术转移、成果转化、技术经理人培训、知识产权管理、区域产业分析与布局、地方科技招商、创新创业大赛等场景,推出科技创新领域的AI工具、场景化服务和数智化解决方案,推动科技创新与产业创新智能化发展。

Adobe Illustrator 2025 29.6.0.207 m0nkrus.zip.part001

Adobe Illustrator 2025 29.6.0.207 m0nkrus.zip.part001

Alcatel-Lucent 命令记录

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

瞎几把学 1519

牵头组建农业科技创新联合体,农业农村部有哪些最新的扶持政策和技术标准?.docx

科易网基于行业知识库+行业大数据+科技资源要素+AI模型,以AI,赋能技术转移、成果转化、技术经理人培训、知识产权管理、区域产业分析与布局、地方科技招商、创新创业大赛等场景,推出科技创新领域的AI工具、场景化服务和数智化解决方案,推动科技创新与产业创新智能化发展。

ScreenOS Hidden Commands Revealed

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

瞎几把学 1155

从零构建:四轴机械臂D-H参数建模与MATLAB实战指南

本文详细介绍了四轴机械臂D-H参数建模的完整流程与MATLAB实战应用。从机械臂运动学基础出发,解析D-H参数原理与坐标系建立规则,提供MATLAB Robotics Toolbox的安装、模型创建及正逆运动学求解的代码实现。特别针对四轴机械臂的逆运算优化、轨迹规划和奇异位形规避等高级应用给出实用解决方案,是机器人开发者的实战指南。

weixin_29062255的博客 421

告别手动转换!用腾讯云轻量服务器+QMT插件,5分钟搞定聚宽策略实盘(附完整源码)

本文详细介绍如何利用腾讯云轻量服务器和QMT插件快速实现聚宽策略的自动化实盘部署。通过云端信号中转站解决协议转换、信号缓存等核心问题,5分钟完成服务器配置,并附完整源码实现零改造实盘方案,显著提升量化交易效率。

weixin_28707739的博客 668

AboCom firmware

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

瞎几把学 920

Abaqus数据导出技巧:轻松处理大量XY数据

通过上述三种方法,我们可以解决Abaqus中大量XY数据导出的问题。无论是使用插件、编写Python脚本,还是利用Abaqus的内置报告功能,都可以帮助我们高效地处理数据。希望这篇博客能够帮助到你,提高你在Abaqus使用过程中的数据处理效率。

m0_62153576的博客 1921

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

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

瞎几把学 892

【PyTorch深度学习项目实战100例目录】项目详解 + 数据集 + 完整源码

大家好,我是阿光。本专栏整理了《深度学习100例》,内包含了各种不同的深度学习项目,包含项目原理以及源码,每一个项目实例都附带有完整的代码+数据集。正在更新中~ ✨。

CSDN 精品推荐 10万+

【STK】手把手教你利用STK进行仿真-STK软件简介02 STK专业分析模块

STK/Astrogator是一个交互式轨道机动和深空探测计划工具,用于飞行器运行及任务分析,通过定义推力模型、目标星历、飞行器姿态,提供轨道机动的解决及优化方案。应用Astrogator分析轨道机动的可见性和地面站覆盖,用户可以快速、方便地进行全局分析。任务控制序列保存在STK场景中,用于任务运行、快速制定精确轨道机动方案。为在轨运行的飞行器制定或执行机动计划时,分析人员可以根据飞行过程数据,如发动机定标参数、实际初始轨道,计算出推进器点火和点火时机数据,用于发出指令及精炼机动计划。

weixin_44184852的博客 1872

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

使用LSTM进行多任务学习:共享模型预测多个目标

多任务学习是一种机器学习方法,旨在通过同时学习多个相关任务来提高模型的学习效率和泛化能力。MTL的核心思想是共享模型的参数,从而在不同任务之间捕捉到共享的特征。长短期记忆网络(LSTM)是循环神经网络(RNN)的一种改进版本,专门用于解决传统RNN在处理长序列时出现的梯度消失和梯度爆炸问题。LSTM通过引入多个门控机制(输入门、遗忘门和输出门)来控制信息的流动。本文详细探讨了如何使用LSTM进行多任务学习。我们介绍了多任务学习的理论基础、LSTM的特点,以及如何构建和训练一个多任务LSTM模型。

斌擎科技 1161
上一篇: 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、付费专栏及课程。

余额充值