Ask Your Question
0

Is there a way to build a Wireshark that would install my custom scripts/profile/coloring rules automatically?

asked 2023-04-21 20:53:45 +0000

RubensDelrue gravatar image

updated 2023-04-22 02:46:49 +0000

Guy Harris gravatar image

I wrote a LUA dissector for our internal protocol, added some Coloring rules and also a Profile. This is working on my Windows Wireshark. Besides a batch file solution, is there a way to include my files in a wrapped version that some other colleague could just install automatically? Let's say even opening Wireshark with a filter already present.

edit retag flag offensive close merge delete

Comments

When you say "build" do you mean create a Windows Wireshark Installer?

Chuckc gravatar imageChuckc ( 2023-04-21 22:47:35 +0000 )edit

Yes. I want my team (that is not familiar with Wireshark) to be able to install Wireshark and not to worry about copying profile files nor lua scripts/coloring rules. It would just install it where it needs to be once. I found NSIS but haven't use it.

RubensDelrue gravatar imageRubensDelrue ( 2023-04-21 22:53:59 +0000 )edit

"internal protocol" may not allow it, but if you could Contribute Your Changes they would then be included and maintained with the standard installer.

I'm not sure if there is a standard way to do this so these are just my $.02.

Add a custom section to wireshark.nsi. This gives the user the option of not including (installer check box) and makes clear in the install process that some custom stuff is being added.
Or repurpose custom_plugins.txt that is described in doc/README.plugins.
Then any updates to wireshark.nsi won't wallop your changes.

Chuckc gravatar imageChuckc ( 2023-04-21 23:36:40 +0000 )edit

Great. I'll check if we are allowed to Contribute and otherwise will check your .nsi way. Thanks a lot!

RubensDelrue gravatar imageRubensDelrue ( 2023-04-21 23:46:13 +0000 )edit

Would adding a Display Filter Button to the dfilter_buttons file come close to starting with a display filter?

Chuckc gravatar imageChuckc ( 2023-04-21 23:47:48 +0000 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-04-22 02:11:41 +0000

Guy Harris gravatar image

updated 2023-04-22 02:49:44 +0000

Is there a way to build a Windows Wireshark that would install my custom scripts/profile/rules automatically?

Wireshark installation packages (Windows installers, macOS drag-and-drop application bundles, Linux/*BSD/Solaris/etc. packages for various package managers) include "system" settings files:

  • Windows: stored in C:\Program Files\Wireshark (or wherever Wireshark is installed);
  • macOS: stored in /Applications/Wireshark.app/Contents/Resources/share/wireshark (or whoever Wireshark is installed);
  • other UN*Xes: stored in /usr/share/wireshark or /usr/local/share/wireshark or whatever the share directory corresponding to where Wireshark is installed is;

and "system" plugins:

  • Windows: stored in C:\Program Files\Wireshark\plugins (or wherever Wireshark is installed);
  • macOS: stored in /Applications/Wireshark.app/Contents/PlugIns/wireshark (or whoever Wireshark is installed);
  • other UN*Xes: stored in /usr/lib/wireshark/plugins or /usr/local/lib/share/wireshark (possibly with some instruction set-specific directory inserted under lib) or whatever the share directory corresponding to where Wireshark is installed is;

If you were to build a Wireshark installation that:

  • adds your new Lua dissector to the "system" plugins directory;
  • adds your coloring rules to the coloringrules file in the "system" settings files directory;
  • adds you profile to the profiles directory in the "system" settings files directory;

that would be an installer that would install your add-ons.

Unfortunately, we don't have a simple process for doing that; building an installer is done from Wireshark source, including building Wireshark itself from source.

EDIT: there's also a dfilters system settings file to which you could add your display filter(s). There is, however, no mechanism to automatically apply that filter when a capture file is first opened (or a capture is started), but adding a button in the dfilter_buttons file, as Chuckc suggested, would make it easier to apply quickly.

edit flag offensive delete link more

Comments

Great, thank you for the answer! I will consider it

RubensDelrue gravatar imageRubensDelrue ( 2023-04-24 15:56:52 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2023-04-21 20:53:45 +0000

Seen: 524 times

Last updated: Apr 22 '23