Ethereal.docx
- 文档编号:18017124
- 上传时间:2023-08-05
- 格式:DOCX
- 页数:41
- 大小:412.58KB
Ethereal.docx
《Ethereal.docx》由会员分享,可在线阅读,更多相关《Ethereal.docx(41页珍藏版)》请在冰点文库上搜索。
Ethereal
6.1. 查看捕获的包
一旦捕获了一些包,或者打开了一个原来保存过的捕获文件,包就会显示在包列表面板中,可以通过点击某一个包来进行查看,以树状查看及字节面板。
点击+号可以扩展树的任何部分,并且可以选择单独的字段。
下面的例子说明了选择一个TCP包的情况,见图 6.1,“选择一个TCP包进行查看”.同时也选择了TCP头部的Acknowledgment序列号,同时在字节面板中显示了选择的字节
Figure 6.1. 选择一个TCP包进行查看
如果在参数设置中选择了“实时更新包列表”,那么可以用同样的办法,在Ethereal捕获的过程中进查看。
另外,也可在一个单独的窗口查看一个包。
如图 6.2,“在一个单独的窗口中查看一个包”.做法是:
首先在包列表中选择一个包,然后从Display菜单中选择"ShowPacketinNewWindows"。
这可以容易比较两个甚至多个包。
图 6.2. 在一个单独的窗口中查看一个包
最后,在包列表面板,包细节面板和包字节面中,通过点击鼠标右键可以弹出一个菜单
Thefollowingtablegivesanoverviewwhichfunctionsareavailableinthepanes,wheretofindthecorrespondingfunctioninthemenu,andashortdescriptionofeachitem.
表 6.1. 弹出菜单的功能总览
项目
List
Details
Bytes
Menu
Description
MarkPacket(toggle)
X
-
-
Edit
标记一个包
TimeReference
X
-
-
Edit
设置/复位及发现时间参考
ExpandSubtrees
-
X
-
View
扩展当前选择的子树
ExpandAll
-
X
-
View
扩展所有包的所有子树
CollapseAll
-
X
-
View
Etherealkeepsalistofalltheprotocolsubtreesthatareexpanded,andusesittoensurethatthecorrectsubtreesareexpandedwhenyoudisplayapacket.这个菜单项将收起所有包的树状查看,即折叠。
.
ApplyasFilter
X
X
-
Analyze
.
PrepareaFilter
X
X
-
Analyze
.
FollowTCPstream
X
X
-
Analyze
查看一对结点之间的一个TCP流的所有数据
WikiProtocolPage
-
X
-
-
Showthewikipagecorrespondingtothecurrentlyselectedprotocolinyourwebbrowser.
FilterFieldReference
-
X
-
-
Showthefilterfieldreferencewebpagecorrespondingtothecurrentlyselectedprotocolinyourwebbrowser.
ProtocolPreferences...
-
X
-
-
Themenuitemtakesyoutothepreferencesdialogandselectsthepagecorrespondingtotheprotocoliftherearesettingsassociatedwiththehighlightedfield.MoreinformationonpreferencescanbefoundinSection 9.5,“Preferences”.
DecodeAs...
X
X
-
Analyze
.
Print...
X
-
-
File
打印(选择的)包.
ShowPacketinNewWindow
X
-
-
View
在另一个窗口中显示选择的包
Resolvename
-
X
-
View/NameResolution
调用一个名称解析,但不是所有包
GotoCorrespondingPacket
-
X
-
Go
Iftheselectedfieldhasapacketnumberinit,gotoit.Thecorrespondingpacketwilloftenbearesponsewhichisrequestedbythispacket,ortherequestforwhichthispacketisaresponse.
Copy
-
-
X
-
Copy选择的数据至剪切板(XXX-inwhichformat).
ExportSelectedPacketBytes...
-
-
X
File->Export
将包字节导出至一个二进制文件
图 6.3. 包列表面板的弹出菜单
MarkPacket(toggle)标记包
对一个包打标记
TimeReference时间参考
与Edit菜单里的同名项功能相同。
允许设置时间参考及利用时间参考工作
ApplyasFilter应用过滤
与Analyze菜单项里的同名项功能相同。
PrepareaFilter准备一个过滤
与Analyze菜单项里的同名项功能相同。
FollowTCPStream追踪TCP流
与Analyze菜单项里的同名项功能相同。
允许查看一对站点间的TCP流的所有数据
DecodeAs...按…解码
与Analyze菜单项里的同名项功能相同。
Print...打印…..
与File菜单项里的同名项功能相同。
允许打印包
ShowPacketinNewWindow(在一个新窗口中显示包)
与View菜单项里的同名项功能相同。
在一个新窗口中显示选择的包
图 6.4. 包细节面板弹出菜单项
ExpandSubtrees扩展子树
扩展当前选择的子树
ExpandAll(扩展所有)
扩展捕获文件里所有包的所有子树
CollapseAll(折叠所有)
Etherealkeepsalistofalltheprotocolsubtreesthatareexpanded,andusesittoensurethatthecorrectsubtreesareexpandedwhenyoudisplayapacket.这个菜单项收起所有包的树状查看方式
ApplyasFilter(应用为过滤)
与Analyze菜单项里的同名项功能相同
PrepareaFilter(准备一个过滤)
与Analyze菜单项里的同名项功能相同
FollowTCPStream(追踪TCP流)
与Analyze菜单项里的同名项功能相同。
查看一对站点间TCP流的所有数据
WikiProtocolPage
Showthewikipagecorrespondingtothecurrentlyselectedprotocolinyourwebbrowser.
FilterFieldReference
Showthefilterfieldreferencewebpagecorrespondingtothecurrentlyselectedprotocolinyourwebbrowser.
ProtocolProperties...
Themenuitemtakesyoutothepropertiesdialogandselectsthepagecorrespondingtotheprotocoliftherearepropertiesassociatedwiththehighlightedfield.MoreinformationonpreferencescanbefoundinFigure 9.8,“Thepreferencesdialogbox”.
DecodeAs...用….解码
与Analyze菜单项里的同名项功能相同
ResolveName(解析名字)
对选择的包进行名称解析,但不是每一个包
GotoCorrespondingPacket(转到相应的包)
如果选择的字段有一个相应的包,就转到它。
相应的包通常做为一个需求/应答对
图 6.5. 包字节面板的弹出菜单
Copy
复制选择的数据至剪切板
ExportSelectedPacketBytes...(导出选择的包的字节….)
与File菜单里的同名项功能相同。
允许导出包字节至一个二进制文件
6.2. 查看时进行包过滤
Ethereal有两种过滤语言:
一个是在捕获时使用的,另一个在显示时使用的。
在这一部分,我们探讨第二种类型的过滤:
显示过滤。
第一种我们已经在Section 4.8,“捕获过滤”讨论过了。
显示过滤允许用户隐藏不感兴趣的数据包,而只显示那些感兴趣的数据包。
允许按照如下条件显示:
∙协议
∙一个字段存在与否
∙一个字段的值
∙两个字段的比较
∙...以及更多
要基于协议类型选择包,只需要在工具条的Filter:
字段里写上,然后按回车就可以。
fieldinthefiltertoolbaroftheEtherealwindowandpressentertoinitiatethefilter.图 6.6,“过滤TCP协议例子中显示了当在过滤字段里打入tcp后显示的内容
注意!
所有协议和字段名要用小写。
另外,输入完后,不要忘记按一下回车键
图 6.6. 过滤TCP协议
正如我们注意到的,只有TCP协议的包被显示出来了(例,包1-10被隐藏了).包的编号将被保留,因此第一个包的编号变成了11。
注意!
当使用显示过滤时,所有的包都保存在捕获文件里。
显示过滤仅仅改变捕获文件的显示,但不改过捕获文件的内容
可以过滤任何Ethereal理解的协议。
也可以按照解字段进行过滤(字段:
解码器追加到树查看中的),Youcanalsofilteronanyfieldthatadissectoraddstothetreeview,butonlyifthedissectorhasaddedanabbreviationforthefield.AlistofsuchfieldsisavailableintheEtherealintheAddExpression...dialogbox.YoucanfindmoreinformationontheAddExpression...dialogboxinSection 6.4,“The"FilterExpression"dialogbox”.
Forexample,tonarrowthepacketlistpanedowntoonlythosepacketstoorfromtheIPaddress192.168.0.1,useip.addr==192.168.0.1.
例如,为了减小包列表面板,仅显示那些来自或者发出者是192.168.0.1的包,使用ip.addr==192.168.0.1.
注意!
要删除过滤,点击过滤字段右边的Clear按钮。
6.3. 建立显示过滤表达式
Ethereal提供了一个简单的,但功能强大的显示过滤语言。
利用它,用户可以建立非常复杂的表达式。
Youcancomparevaluesinpacketsaswellascombineexpressionsintomorespecificexpressions.Thefollowingsectionsprovidemoreinformationondoingthis.
提示!
在下面的站点将提供一些显示过滤的例子EtherealWikiDisplayFilterpageat
6.3.1. 显示过滤字段
在包细节面板中的每一个字段都可以做为过滤串。
仅仅包中的存在的字段才被显示。
例:
过滤串tcp将只显示包含tcp协议的数据包
在"Help/SupportedProtocols"的"DisplayFilterFields"是一份完整的可用字段的列表
6.3.2. 值的比较
用户也可以使用一些不同的比较操作符来建立显示过滤。
这些操作符见表 6.2,“显示过滤比较操作符”.
提示!
可以使用英语或类C的符号,甚至可以在一个过滤串中混合使用这两种符号
表 6.2. 显示过滤比较操作符
English
C-like
Descriptionandexample
eq
==
Equal
ip.addr==10.0.0.5
ne
!
=
Notequal
ip.addr!
=10.0.0.5
gt
>
Greaterthan
frame.pkt_len>10
lt
<
Lessthan
frame.pkt_len<128
ge
>=
Greaterthanorequalto
frame.pkt_lenge0x100
le
<=
Lessthanorequalto
frame.pkt_len<=0x20
另外,所有协义都是有类型的,表 6.3,“显示过滤字段类型”提供了一个类型列表及如何去表达
表 6.3. 显示过滤字段类型
Type
Example
无符号整数(8-bit,16-bit,24-bit,32-bit)
可以用十进制,八进制,十六进制表达整型。
下面的显示过滤是相同的。
ip.lenle1500
ip.lenle02734
ip.lenle0x436
有符号整数(8-bit,16-bit,24-bit,32-bit)
布尔
Abooleanfieldispresentintheprotocoldecodeonlyifitsvalueistrue.例如,tcp.flags.syn出现了,因此是真。
onlyiftheSYNflagispresentinaTCPsegmentheader.
因此,过滤表达式tcp.flags.syn仅选择那些存在这个标记的包。
也就是说TCP头中包含SYN标记的。
同样的,要找源路由的tokenring包,使用tr.sr.
以太网地址(6字节)
eth.addr==ff:
ff:
ff:
ff:
ff:
ff
IPv4地址
ip.addr==192.168.0.1
IPv6地址
IPX网络号
String(text)
Double-precisionfloatingpointnumber
6.3.3. 结合表达式
逻辑操作符可以组合过滤表达式,这些逻辑操作符如表 6.4,“显示过滤逻辑操作符”
表 6.4. 显示过滤逻辑操作符
English
C-like
Descriptionandexample
and
&&
LogicalAND
ip.addr==10.0.0.5andtcp.flags.fin
or
||
LogicalOR
ip.addr==10.0.0.5orip.addr==192.1.1.1
xor
^^
LogicalXOR
tr.dst[0:
3]==0.6.29xortr.src[0:
3]==0.6.29
not
!
LogicalNOT
notllc
[...]
子串操作
Etherealallowsyoutoselectsubsequencesofasequenceinratherelaborateways.Afteralabelyoucanplaceapairofbrackets[]containingacommaseparatedlistofrangespecifiers.
eth.src[0:
3]==00:
00:
83
Theexampleaboveusesthen:
mformattospecifyasinglerange.Inthiscasenisthebeginningoffsetandmisthelengthoftherangebeingspecified.
eth.src[1-2]==00:
83
Theexampleaboveusesthen-mformattospecifyasinglerange.Inthiscasenisthebeginningoffsetandmistheendingoffset.
eth.src[:
4]==00:
00:
83:
00
Theexampleaboveusesthe:
mformat,whichtakeseverythingfromthebeginningofasequencetooffsetm.Itisequivalentto0:
m
eth.src[4:
]==20:
20
Theexampleaboveusesthen:
format,whichtakeseverythingfromoffsetntotheendofthesequence.
eth.src[2]==83
Theexampleaboveusesthenformattospecifyasinglerange.Inthiscasetheelementinthesequenceatoffsetnisselected.Thisisequivalentton:
1.
eth.src[0:
3,1-2,:
4,4:
2]==
00:
00:
83:
00:
83:
00:
00:
83:
00:
20:
20:
83
Etherealallowsyoutostringtogethersinglerangesinacommaseparatedlisttoformcompoundrangesasshownabove.
6.3.4. 一个常见的错误
警告!
使用!
=操作符组合组合如下列表达式eth.addr,ip.addr,tcp.port,udp.port及相似的将不能正常的工作!
用户经常使用过滤串ip.addr==1.2.3.4来显示包含1.2.3.4.的数据包
然后,使用ip.addr!
=1.2.3.4去查看不包含1.2.3.4的数据包。
不幸的是,这将不能得到想要的结果
Instead,thatexpressionwillevenbetrueforpacketswhereeithersourceordestinationIPaddressequals1.2.3.4.Thereasonforthis,isthattheexpressionip.addr!
=1.2.3.4mustbereadas"thepacketcontainsafieldnamedip.addrwithavaluedifferentfrom1.2.3.4".AsanIPdatagramcontainsbothasourceandadestinationaddress,theexpressionwillevaluatetotruewheneveratleastoneofthetwoaddressesdiffersfrom1.2.3.4.
如果想过滤出所有包含1.2.3.4的数据包,更改!
(ip.addr==1.2.3.4)asitreads"showmeallthepacketsforwhichitisnottruethatafieldnamedip.addrexistswithavalueof1.2.3.4",orinotherwords,"filteroutallpacketsforwhichtherearenooccurrencesofafieldnamedip.addrwiththevalue1.2.3.4".
6.4. 过滤表达式对话框
WhenyouareaccustomedtoEthereal'sfilteringsystemandknowwhatlabelsyouwishtouseinyourfiltersitcanbeveryquicktosimplytypeafilterstring.HoweverifyouarenewtoEtherealorareworkingwithaslightlyunfamiliarprotocolitcanbeveryconfusingtotrytofigureoutwhattotype.TheFilterExpressiondialogboxhelpswiththis.当用户习惯于Ethereal的过滤系统
提示!
“FilterExpression"对话框是一个学习写Ethereal显示过滤串的极好的方法
图 6.7. 过滤表达式对话框
刚第一次调用过滤表达式对话框时,将显示一个字段名的树形列表,按照协议来组织的,另外还有一个Relation框选择操作符
FieldName字段名
从协议字段树中选择一个协议字段。
Selectaprot
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Ethereal
![提示](https://static.bingdoc.com/images/bang_tan.gif)