Code Monkey home page Code Monkey logo

cashark's Introduction

Wireshark dissector plugin for EPICS CA and PVA protocols

Tested with wireshark 1.2.11, 1.8.2, 1.10.8, 2.2.6, 2.6.0, and 3.4.10. Works on RHEL 7.4 (wireshark 1.10.14).

Using

Only the file ca.lua is needed. Then start wireshark with

wireshark -X lua_script:/path/to/ca.lua

and/or

wireshark -X lua_script:/path/to/pva.lua

More than one -X argument may be passed to load both plugins.

Status

The pva.lua plugin decodes PVA traffic on standard (TCP/5075 and UDP/5076) and non-standard ports.

The ca.lua plugin does general decoding of CA UDP and TCP traffic on the standard ports (5064 and 5065). It does TCP segment reassembly for large messages.

The CA protocol provides no easy way to distinguish client and server messages without observing the start of the connection. Thus this plugin can not fully decode all messages. Currently only some messages are fully decoded. Others decode with only generic field names.

Reporting bugs

Bug reports are welcome (and patches more so).

Send to "Michael Davidsaver" [email protected] or open a github issue. Please include repository revision, as well as wireshark and lua versions.

If possible, please include a (filtered) packet capture file which will trigger the error.

Note that the PVA dissector triggers bug 10233 with wireshark 1.12.1, which is known to be fixed with 2.0.

Setup

To automatically load the CA and/or PVA dissectors instead of using the -X argument.

On RHEL systems, the wireshark config directory is at /usr/share/wireshark/. If the file /usr/share/wireshark/init.lua doesn't exist, install the package wireshark-devel.

Edit /etc/wireshark/init.lua and remove or comment out the line about disabling LUA support ("disable_lua = true"). You may also need to change the line "run_user_scripts_when_superuser = false" depending on how you run wireshark.

Next copy the file ca.lua from this repository to /etc/wireshark/.

Then add either or both lines to the end of init.lua.

dofile("ca.lua")
dofile("pva.lua")

If all goes well the string "Loaded CA" and/or "Loaded PVA" will be printed to the console when wireshark starts.

To install this for a single user create $HOME/.wireshark/init.lua with a single line "dofile("ca.lua")" and place ca.lua in this directory.

tshark

Dissectors may also be used with the CLI interface tshark. For example, the following prints all CA decode information in test/cabeacon.cap.

tshark -r test/cabeacon.cap \
 -X lua_script:ca.lua \
 -PO ca \
 'ca'

And with PVA:

tshark -r test/pva-beacon.pcapng.gz \
 -X lua_script:ca.lua \
 -PO pva \
 'pva'

Note that both decoders can be loaded simultaneously:

tshark \
 ...
 -X lua_script:ca.lua \
 -X lua_script:pva.lua \
 -PO ca,pva \
 'ca || pva'

cashark's People

Contributors

mdavidsaver avatar msekoranja avatar ralphlange avatar sasaki77 avatar thomasives avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cashark's Issues

Problems encountered during the use of pva plug-in

Hello, I am using cashark to analyze the EPICS network, and I encountered a problem.I use ca.lua and pva.lua in the same way. Wireshark has no problem when using the ca plug-in, but it will report an error when using the pva plug-in. According to the error message, how can I specify the TCP and UDP ports when I start wireshark with pva.lua?
Snipaste_2021-12-27_19-27-12
Thanks for your help!

Include formatted time in `pkt.cols.info`

cf. https://epics.anl.gov/tech-talk/2021/msg02039.php

On 11/24/21 6:07 PM, Shankar, Murali via Tech-talk wrote:

Hello,

I am trying to track down some connectivity issues. I am using the wireshark LUA plugin to process a packet dump from production. Being a wireshark newbie, I was wondering if anyone know how to print the timestamp_sec and timestamp_nsec as part of rendering the ca_monitor event here - https://github.com/mdavidsaver/cashark/blob/master/ca.lua#L694 https://github.com/mdavidsaver/cashark/blob/master/ca.lua#L694. I am using wireshark-1.10.14 that ships as part of RHEL7...

Dissection fails using Wireshark 1.10.14

In ca.lua:590 st is nil. I believe it's due to the previous line t:add():set_text. I don't think the set_text call returns the tree item to st. I tested with the set_text in a separate line and all looks good.

Tested with
CentOS 7
Wireshark 1.10.14
Lua 5.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.