Skip to content

picnoir/nix-dissector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nix Daemon Wireshark Dissector

Wireshark lua dissector for the Nix daemon Unix domain socket. A useful tool to debug the Nix daemon protocol.

Screenshot showing a Wireshark window dissecting the Nix daemon protocol

Usage

With flakes:

nix run .#

Without flakes:

"$(nix-build)/bin/snoop-nix-daemon"

A Wireshark window appears and start to dissect the packets passing through /nix/var/nix/daemon-socket/socket, the Nix daemon socket.

Background

Wireshark cannot listen to Unix domain sockets out of the box. We leverage the sockdump tool to capture the daemon packets before sending them to Wireshark's stdin. Under the hood, sockdump uses BPF (through BCC) to intercept the Unix socket packets. We need the root privilege to load this BPF program to the kernel.

In this repository, you can also find a Lua wireshark dissector in charge of parsing the Nix daemon protocol.

About

Wireshark dissector for the Nix daemon protocol.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published