标签: wireshark-dissector

frame包含"\ x03\x00\x0e\xa8"在wireshark中的显示过滤器显示不包含这些字节的数据包

我在wireshark中使用了以下过滤器来查找包含这些字节的数据包:

frame contains "\x03\x00\x0e\xa8"
Run Code Online (Sandbox Code Playgroud)

但是当我看到这个过滤器的结果时,它会显示超过1k的数据包,甚至不包含这些字节.例如,它甚至显示以下以太网数据包:

00219ba0610678e7d1c625f40800450000282a0340008006cd88c0a87801d43af65f059e00503bac54cf9f17722a5010ffff04e50000
Run Code Online (Sandbox Code Playgroud)

这个字节包含在这个数据包中.类似地,显示了几个其他分组,而实际上只有两个包含这些字节的分组也被显示.谁能告诉我这里的问题是什么?任何帮助都将得到很高的评价.谢谢

network-programming packet-capture tcpdump wireshark wireshark-dissector

4
推荐指数
1
解决办法
6838
查看次数

如何在LUA解剖器中重新组装TCP数据包?

我有一个解析器,它运行在TCP协议之上,并且具有在多个TCP数据包上流动的数据.

我想在转换所有内容之前汇编数据,所以我理解我需要tcp_dissect_pdus()它,但我找不到它的文档或示例.

任何人都可以指导我或帮助我理解我如何使用它吗?

lua tcp wireshark-dissector

4
推荐指数
1
解决办法
4063
查看次数

lua wireshark插件解剖器缓冲区长度

如何在解剖器功能中获取缓冲区数据的长度.类型是userdatalua,它指向原始内存.我试图将其转换为metatable,但仍然无法获得它的长度.

lua wireshark-dissector

4
推荐指数
1
解决办法
1988
查看次数

如何使用侦听器获取TCP流号?

我分析了一个非常大的PCAP,它持有许多HTTP事务,其中一些让我感兴趣.我使用tsharkLua脚本主要是查询匹配过滤器的所有数据包.

tshark -X lua_script:filter.lua -r some.pcap  -q
Run Code Online (Sandbox Code Playgroud)

到现在为止还挺好.但是,我正在寻找一个数据包的TCP流号的值,该值通过tcp.streamWireshark中的名称.任何人都可以说我需要进行哪些更改filter.lua才能打印出来?

-- filter.lua
do
    local function init_listener()
        local tap = Listener.new("http","http contains someKeyValue && tcp.port eq 1234")
        function tap.reset()
        end
        function tap.packet(pinfo,tvb,ip)
            print("Found my packet ... now what?")
        end
        function tap.draw()
        end
    end
    init_listener()
end
Run Code Online (Sandbox Code Playgroud)

什么文档pinfo,tvb并且ip 是unforthcoming.

lua wireshark wireshark-dissector

4
推荐指数
1
解决办法
490
查看次数

我该如何编译这个插件?

我正在关注foo解析器示例,但想知道如何编译它.

foo解剖器示例显示在以下链接中:http: //www.wireshark.org/docs/wsdg_html_chunked/ChDissectAdd.html

你会注意到它提到interlink目录包含我可以使用的支持文件的好例子,我需要修改Makefile.am和makefile.com等等.我已经修改了这些以反映foo模块.

但是,现在我想知道如何构建它.我试过运行automake但它抱怨没有configure.in.对不起,我对gnu构建环境并不熟悉.

此外,是否可以独立构建此模块?或者我是否需要所有其他wirehark来源?我当然在ubuntu下安装了wireshark-dev.

automake gnu makefile wireshark wireshark-dissector

3
推荐指数
1
解决办法
4548
查看次数

我在哪里可以找到Pcap for Diameter协议(WireShark)的样本?

我想知道是否有任何样品wireshark pcaps用于直径协议?如果是的话请分享.

谢谢

pcap wireshark-dissector diameter-protocol

3
推荐指数
1
解决办法
9615
查看次数

当我关闭wireshark时,如何获得wireshark Lua解剖器协议首选项以保存并保留?

所以我写了我只能称之为很棒的解剖器的东西。它的作用不大,却大大提高了我的工作效率。

我唯一的问题是我暴露了一些首选项,它们不会坚持通过wireshark关闭/启动。

IE :

先决条件:Lua 脚本必须在插件目录中...

  1. 打开wireshark,编辑>首选项>协议>http.queryparameters...
  2. 将 Param1 值设置为“aaa”,单击“确定”。(它会正确影响解剖。)
  3. 关闭wireshark,重新开始,值又是别的了。

我的解剖器:

-- Written by Eitam Doodai
-- trivial postdissector example
-- declare some Fields to be read
full_uri_from_request = Field.new("http.request.full_uri")

-- declare our (pseudo) protocol
http_query_params_proto = Proto("http.query_parameters","HTTP Query Parameters Postdissector")

-- create the fields for our "protocol"
query_param1 = ProtoField.string("http.query_parameters.param1","PARAM1")
query_param2 = ProtoField.string("http.query_parameters.param2","PARAM2")
query_param3 = ProtoField.string("http.query_parameters.param3","PARAM3")

-- add the field to the protocol
http_query_params_proto.fields = {query_param1}
http_query_params_proto.fields = {query_param2}
http_query_params_proto.fields = {query_param3}

-- Add prefs
local p1 = …
Run Code Online (Sandbox Code Playgroud)

lua wireshark wireshark-dissector

3
推荐指数
1
解决办法
1472
查看次数

Wireshark 信标框架:WPS 供应商标签

据我了解,wireshark 能够识别接入点(通过信标帧或探测响应)是否配置为 WPS。

特别是在无线管理帧下,有一个标记参数-->“标记:供应商特定:Microsoft:WPS”,保存信息元素-->“Wifi 保护设置状态:已配置 0x02”。

我理解该值:0x02 表示该 AP 确实配置为 WPS(在 WPS 协议规范中指定)。

现在我的问题是指定“特定于供应商”Microsoft 的部分。这是否表明 WPS 的这种特定实现是 Microsoft 特定的?如果是的话,是否有其他供应商实现此功能,我如何找到。我有来自我的 WIFI 卡的样本数据,但我没有注意到除了 Microsoft 之外的任何其他供应商。微软是否垄断了这项技术?这是wireshark默认执行的操作吗?我很确定我在这里遗漏了一些东西,任何信息都会有很大帮助。

wireshark 802.11 信标帧的屏幕截图

wireshark wifi wireshark-dissector wps

3
推荐指数
1
解决办法
6100
查看次数

如何为自定义协议创建 Wireshark 解剖器,而无需重新编译 Wireshark

我一直在寻找一种编译和运行自定义 Wireshark 解剖器的方法,而无需重新编译整个 Wireshark 项目。Web 上的许多地方都要求开发人员编写他们的插件并链接到 Wireshark。

但是,我发现有些人能够使用 Wireshark 的插件系统编写解剖器并使其运行,其路径可在 Wireshark 帮助/关于部分中找到。

尽管这些人在 Lua 和 C++ 中成功编写了解剖器,但我尝试了很多教程,但我真的很迷茫。

有人可以帮助我在 Ubuntu 16.04 64bit 上制作一个非常简单的 Wireshark 解剖器的步骤吗?

c++ lua wireshark wireshark-dissector

3
推荐指数
1
解决办法
2275
查看次数

如何为 Lua Wireshark Dissector 创建 Protofield 子阵列

给出以下示例:

local f= mycoolprotocol.fields
f.Length = ProtoField.uint32("MCP.Length","Length",base.DEC)
f.MsgType = ProtoField.uint16("MCP.MsgType","MsgType",base.DEC)
Run Code Online (Sandbox Code Playgroud)

我已经声明了 2 个 Protofields。但想象一下,我有一个重复的组或一组项目:

消息正文如下所示:

struct person
{
  int16 age;
  string name;
}
person[] p = new person[2];
Run Code Online (Sandbox Code Playgroud)

理想情况下,我想在 Wireshark 中为该组创建一个子树

+ Persons
 + Person1
    name
    age
 + Person2
    name
    age
Run Code Online (Sandbox Code Playgroud)

问题是我不知道如何在 Lua 中构建它。这声明了2个protofields:

f.name = Protofield.string("MCP.name","name","Text")
f.age = ProtoField.uint16("MCP.age","age",base.DEC)
Run Code Online (Sandbox Code Playgroud)

但我想改为创建组的动态数组,所以我可以这样做:

subtree:add_le( f[0].name, buffer(x,y)) 
Run Code Online (Sandbox Code Playgroud)

那么,有Protofield.ProtoFieldArray吗?是否可以?欢迎任何其他想法。

谢谢。

另外,作为参考:http : //ask.wireshark.org/questions/28038/how-to-create-a-protofield-sub-array-in-lua

lua wireshark wireshark-dissector protofield

2
推荐指数
1
解决办法
2107
查看次数

如何添加将显示HTTP请求查询参数值的wireshark列?

例如:如果我有http://somepage.com/somefolder/someresouce?p1=value&p2=value&p3=value

我希望看到一个列,如果它存在于请求中,它将显示p2的值.

我用Google搜索,问周围的人但是找不到一个好的答案.

如果想创建一个解剖器可能会有所帮助,但我不想为http编写一个新的解剖器..这是一种矫枉过正的行为.

并且没有使用自定义列类型的http.request.queryParams ["p2"]语法.

提前致谢!

wireshark wireshark-dissector

2
推荐指数
1
解决办法
2483
查看次数

用pyshark计算数据包数量

在此代码中使用pyshark

import pyshark
cap = pyshark.FileCapture(filename)
i = 0
for idx, packet in enumerate(cap):
    i += 1
print i
print len(cap._packets)
Run Code Online (Sandbox Code Playgroud)

ilen(cap._packets)给出两个不同的结果。这是为什么?

python wireshark packet-sniffers wireshark-dissector pyshark

2
推荐指数
3
解决办法
3503
查看次数