Snifter 1.3.0
dotnet add package Snifter --version 1.3.0
NuGet\Install-Package Snifter -Version 1.3.0
<PackageReference Include="Snifter" Version="1.3.0" />
paket add Snifter --version 1.3.0
#r "nuget: Snifter, 1.3.0"
// Install Snifter as a Cake Addin #addin nuget:?package=Snifter&version=1.3.0 // Install Snifter as a Cake Tool #tool nuget:?package=Snifter&version=1.3.0
Snifter
__.---,__
.-` '-,__
&/ ',_\ _\
/ '',_
| . (")
|__.`'-..--|__|--`` Snifter
Snifter is a raw socket IP packet capturing library and application for Windows and Linux, with a tiny CPU and memory footprint.
Output can be written to PCAPNG files, and you can filter captured packets based on protocol, source/destination address and source/destination port.
Why?
On Windows, you can't capture on the local loopback address 127.0.0.1
with a packet capture driver like WinPcap - but you can by using a raw socket sniffer, like Snifter.
Additionally, Snifter is a cross-platform, portable library and application that doesn't require any drivers to be installed.
Snifter started life only for Windows, and Linux support was later added thanks to .NET Core.
Getting Started
Install the Snifter package from NuGet:
Install-Package Snifter
You can see an example of how to use the library in the Snifter.App
code in src/App
, including capturing, parsing, filtering and saving packets.
App Limitations
You must run Snifter.App
with elevated privileges on Windows, or with sudo
on Linux - this is an OS-level requirement to create raw sockets.
For now at least, Snifter only supports IPv4. It should be straightforward to add support for IPv6, but I don't use IPv6 yet, so haven't added it.
If you want to capture loopback traffic, it's important that your apps are communicating specifically with 127.0.0.1
- not localhost
.
Note that Snifter is restricted to only capturing TCP packets on Linux.
App Usage
snifter.exe -i x -f filename
-i, --interface=VALUE ID of the interface to listen on
-f, --filename=VALUE Filename to output sniffed packets to. Defaults to snifter.pcapng
-o, --operator=VALUE Whether filters should be AND or OR. Defaults to OR
-p, --protocol=VALUE Filter packets by IANA registered protocol number
-s, --source-address=VALUE Filter packets by source IP address
-d, --dest-address=VALUE Filter packets by destination IP address
-x, --source-port=VALUE Filter packets by source port number
-y, --dest-port=VALUE Filter packets by destination port number
-h, -?, --help Show command line options
Run snifter.exe -h
to see a list of available network interfaces.
Note that each filter option can only be specified once.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 is compatible. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.7.1
- Microsoft.Extensions.Logging.Abstractions (>= 3.1.5)
- Microsoft.IO.RecyclableMemoryStream (>= 1.3.4)
- Mono.Posix (>= 5.4.0.201)
- System.Memory (>= 4.5.4)
- System.Runtime.InteropServices.RuntimeInformation (>= 4.3.0)
- System.Security.Principal.Windows (>= 4.5.1)
-
.NETStandard 2.0
- Microsoft.CSharp (>= 4.7.0)
- Microsoft.Extensions.Logging.Abstractions (>= 3.1.5)
- Microsoft.IO.RecyclableMemoryStream (>= 1.3.4)
- Mono.Posix (>= 5.4.0.201)
- System.Memory (>= 4.5.4)
- System.Runtime.InteropServices.RuntimeInformation (>= 4.3.0)
- System.Security.Principal.Windows (>= 4.5.1)
-
.NETStandard 2.1
- Microsoft.CSharp (>= 4.7.0)
- Microsoft.Extensions.Logging.Abstractions (>= 3.1.5)
- Microsoft.IO.RecyclableMemoryStream (>= 1.3.4)
- Mono.Posix (>= 5.4.0.201)
- System.Runtime.InteropServices.RuntimeInformation (>= 4.3.0)
- System.Security.Principal.Windows (>= 4.5.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.3.0 | 590 | 9/14/2020 |