'\" t .\" Title: extcap .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.20 .\" Date: 2024-02-04 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" .TH "EXTCAP" "4" "2024-02-04" "\ \&" "\ \&" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 .nh .ad l .de URL \fI\\$2\fP <\\$1>\\$3 .. .als MTO URL .if \n[.g] \{\ . mso www.tmac . am URL . ad l . . . am MTO . ad l . . . LINKSTYLE blue R < > .\} .SH "NAME" extcap \- The extcap interface .SH "DESCRIPTION" .sp The extcap interface is a versatile plugin interface that allows external binaries to act as capture interfaces directly in Wireshark. It is used in scenarios, where the source of the capture is not a traditional capture model (live capture from an interface, from a pipe, from a file, etc). The typical example is connecting esoteric hardware of some kind to the main Wireshark application. .sp Without extcap, a capture can always be achieved by directly writing to a capture file: .sp .if n .RS 4 .nf .fam C the\-esoteric\-binary \-\-the\-strange\-flag \-\-interface=stream1 \-\-file dumpfile.pcap & wireshark dumpfile.pcap .fam .fi .if n .RE .sp but the extcap interface allows for such a connection to be easily established and configured using the Wireshark GUI. .sp The extcap subsystem is made of multiple extcap binaries that are automatically called by the GUI in a row. In the following chapters we will refer to them as "the extcaps". .sp Extcaps may be any binary or script within the extcap directory. Please note, that scripts need to be executable without prefacing a script interpreter before the call. .sp WINDOWS USERS: Because of restrictions directly calling the script may not always work. In such a case, a batch file may be provided, which then in turn executes the script. Please refer to doc/extcap_example.py for more information. .sp When Wireshark launches an extcap, it automatically adds its installation path (normally \fIC:\(rsProgram Files\(rsWireshark\(rs\fP) to the DLL search path so that the extcap library dependencies can be found (it is not designed to be launched by hand). This is done on purpose. There should only be extcap programs (executables, Python scripts, ...) in the extcap folder to reduce the startup time and not have Wireshark trying to execute other file types. .SH "GRAMMAR ELEMENTS" .sp Grammar elements: .sp arg (options) .RS 4 argument for CLI calling .RE .sp number .RS 4 Reference # of argument for other values, display order .RE .sp call .RS 4 Literal argument to call (\-\-call=...) .RE .sp display .RS 4 Displayed name .RE .sp default .RS 4 Default value, in proper form for type .RE .sp range .RS 4 Range of valid values for UI checking (min,max) in proper form .RE .sp type .RS 4 .sp Argument type for UI filtering for raw, or UI type for selector: .sp .if n .RS 4 .nf .fam C integer unsigned long (may include scientific / special notation) double string (display a textbox) selector (display selector table, all values as strings) editselector (selector table which can be overridden, all values as strings) boolean (display checkbox) booleanflag (display checkbox) radio (display group of radio buttons with provided values, all values as strings) fileselect (display a dialog to select a file from the filesystem, value as string) multicheck (display a textbox for selecting multiple options, values as strings) password (display a textbox with masked text) timestamp (display a calendar) .fam .fi .if n .RE .RE .sp value (options) .RS 4 .sp .if n .RS 4 .nf .fam C Values for argument selection arg Argument # this value applies to .fam .fi .if n .RE .RE .SH "EXAMPLES" .sp Example 1: .sp .if n .RS 4 .nf .fam C arg {number=0}{call=\-\-channel}{display=Wi\-Fi Channel}{type=integer}{required=true} arg {number=1}{call=\-\-chanflags}{display=Channel Flags}{type=radio} arg {number=2}{call=\-\-interface}{display=Interface}{type=selector} value {arg=0}{range=1,11} value {arg=1}{value=ht40p}{display=HT40+} value {arg=1}{value=ht40m}{display=HT40\-} value {arg=1}{value=ht20}{display=HT20} value {arg=2}{value=wlan0}{display=wlan0} .fam .fi .if n .RE .sp Example 2: .sp .if n .RS 4 .nf .fam C arg {number=0}{call=\-\-usbdevice}{USB Device}{type=selector} value {arg=0}{call=/dev/sysfs/usb/foo/123}{display=Ubertooth One sn 1234} value {arg=0}{call=/dev/sysfs/usb/foo/456}{display=Ubertooth One sn 8901} .fam .fi .if n .RE .sp Example 3: .sp .if n .RS 4 .nf .fam C arg {number=0}{call=\-\-usbdevice}{USB Device}{type=selector} arg {number=1}{call=\-\-server}{display=IP address for log server}{type=string}{validation=(?:\(rsd{1,3}\(rs.){3}\(rsd{1,3}} flag {failure=Permission denied opening Ubertooth device} .fam .fi .if n .RE .sp Example 4: .sp .if n .RS 4 .nf .fam C arg {number=0}{call=\-\-username}{display=Username}{type=string} arg {number=1}{call=\-\-password}{display=Password}{type=password} .fam .fi .if n .RE .sp Example 5: .sp .if n .RS 4 .nf .fam C arg {number=0}{call=\-\-start}{display=Start Time}{type=timestamp} arg {number=1}{call=\-\-end}{display=End Time}{type=timestamp} .fam .fi .if n .RE .SH "SECURITY CONSIDERATIONS" .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} If you\(cqre running Wireshark as root, we can\(cqt save you. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} Dumpcap retains suid/setgid and group execute permissions for users in the “wireshark” group only. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} Third\-party capture programs run with whatever privileges they\(cqre installed with. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} If an attacker can write to a system binary directory, it\(cqs game over. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} You can find your local extcap directory in \fIAbout\0\(fc\0Folders\fP. .RE .SH "SEE ALSO" .sp wireshark(1), tshark(1), dumpcap(1), androiddump(1), sshdump(1), randpktdump(1) .SH "NOTES" .sp \fBExtcap\fP is feature of \fBWireshark\fP. The latest version of \fBWireshark\fP can be found at \c .URL "https://www.wireshark.org" "" "." .sp HTML versions of the Wireshark project man pages are available at .URL "https://www.wireshark.org/docs/man\-pages" "" "."