extcap.html 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <meta name="generator" content="Asciidoctor 2.0.17">
  8. <title>extcap(4)</title>
  9. <link rel="stylesheet" href="./ws.css">
  10. </head>
  11. <body class="manpage">
  12. <div id="header">
  13. <h1>extcap(4) Manual Page</h1>
  14. <h2 id="_name">NAME</h2>
  15. <div class="sectionbody">
  16. <p>extcap - The extcap interface</p>
  17. </div>
  18. </div>
  19. <div id="content">
  20. <div class="sect1">
  21. <h2 id="_description">DESCRIPTION</h2>
  22. <div class="sectionbody">
  23. <div class="paragraph">
  24. <p>The extcap interface is a versatile plugin interface that allows external binaries
  25. to act as capture interfaces directly in Wireshark. It is used in scenarios, where
  26. the source of the capture is not a traditional capture model
  27. (live capture from an interface, from a pipe, from a file, etc). The typical
  28. example is connecting esoteric hardware of some kind to the main Wireshark application.</p>
  29. </div>
  30. <div class="paragraph">
  31. <p>Without extcap, a capture can always be achieved by directly writing to a capture file:</p>
  32. </div>
  33. <div class="literalblock">
  34. <div class="content">
  35. <pre>the-esoteric-binary --the-strange-flag --interface=stream1 --file dumpfile.pcap &amp;
  36. wireshark dumpfile.pcap</pre>
  37. </div>
  38. </div>
  39. <div class="paragraph">
  40. <p>but the extcap interface allows for such a connection to be easily established and
  41. configured using the Wireshark GUI.</p>
  42. </div>
  43. <div class="paragraph">
  44. <p>The extcap subsystem is made of multiple extcap binaries that are automatically
  45. called by the GUI in a row. In the following chapters we will refer to them as
  46. "the extcaps".</p>
  47. </div>
  48. <div class="paragraph">
  49. <p>Extcaps may be any binary or script within the extcap directory. Please note, that scripts
  50. need to be executable without prefacing a script interpreter before the call.</p>
  51. </div>
  52. <div class="paragraph">
  53. <p>WINDOWS USERS: Because of restrictions directly calling the script may not always work.
  54. In such a case, a batch file may be provided, which then in turn executes the script. Please
  55. refer to doc/extcap_example.py for more information.</p>
  56. </div>
  57. <div class="paragraph">
  58. <p>When Wireshark launches an extcap, it automatically adds its installation path (normally <em>C:\Program Files\Wireshark\</em>) to the DLL search path so that the extcap library dependencies can be found (it is not designed to be launched by hand).
  59. This is done on purpose. There should only be extcap programs (executables, Python scripts, &#8230;&#8203;) in the extcap folder to reduce the startup time and not have Wireshark trying to execute other file types.</p>
  60. </div>
  61. </div>
  62. </div>
  63. <div class="sect1">
  64. <h2 id="_grammar_elements">GRAMMAR ELEMENTS</h2>
  65. <div class="sectionbody">
  66. <div class="paragraph">
  67. <p>Grammar elements:</p>
  68. </div>
  69. <div class="dlist">
  70. <dl>
  71. <dt class="hdlist1">arg (options)</dt>
  72. <dd>
  73. <p>argument for CLI calling</p>
  74. </dd>
  75. <dt class="hdlist1">number</dt>
  76. <dd>
  77. <p>Reference # of argument for other values, display order</p>
  78. </dd>
  79. <dt class="hdlist1">call</dt>
  80. <dd>
  81. <p>Literal argument to call (--call=&#8230;&#8203;)</p>
  82. </dd>
  83. <dt class="hdlist1">display</dt>
  84. <dd>
  85. <p>Displayed name</p>
  86. </dd>
  87. <dt class="hdlist1">default</dt>
  88. <dd>
  89. <p>Default value, in proper form for type</p>
  90. </dd>
  91. <dt class="hdlist1">range</dt>
  92. <dd>
  93. <p>Range of valid values for UI checking (min,max) in proper form</p>
  94. </dd>
  95. <dt class="hdlist1">type</dt>
  96. <dd>
  97. <div class="openblock">
  98. <div class="content">
  99. <div class="paragraph">
  100. <p>Argument type for UI filtering for raw, or UI type for selector:</p>
  101. </div>
  102. <div class="literalblock">
  103. <div class="content">
  104. <pre>integer
  105. unsigned
  106. long (may include scientific / special notation)
  107. double
  108. string (display a textbox)
  109. selector (display selector table, all values as strings)
  110. boolean (display checkbox)
  111. booleanflag (display checkbox)
  112. radio (display group of radio buttons with provided values, all values as strings)
  113. fileselect (display a dialog to select a file from the filesystem, value as string)
  114. multicheck (display a textbox for selecting multiple options, values as strings)
  115. password (display a textbox with masked text)
  116. timestamp (display a calendar)</pre>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. </dd>
  122. <dt class="hdlist1">value (options)</dt>
  123. <dd>
  124. <div class="openblock">
  125. <div class="content">
  126. <div class="literalblock">
  127. <div class="content">
  128. <pre>Values for argument selection
  129. arg Argument # this value applies to</pre>
  130. </div>
  131. </div>
  132. </div>
  133. </div>
  134. </dd>
  135. </dl>
  136. </div>
  137. </div>
  138. </div>
  139. <div class="sect1">
  140. <h2 id="_examples">EXAMPLES</h2>
  141. <div class="sectionbody">
  142. <div class="paragraph">
  143. <p>Example 1:</p>
  144. </div>
  145. <div class="literalblock">
  146. <div class="content">
  147. <pre>arg {number=0}{call=--channel}{display=Wi-Fi Channel}{type=integer}{required=true}
  148. arg {number=1}{call=--chanflags}{display=Channel Flags}{type=radio}
  149. arg {number=2}{call=--interface}{display=Interface}{type=selector}
  150. value {arg=0}{range=1,11}
  151. value {arg=1}{value=ht40p}{display=HT40+}
  152. value {arg=1}{value=ht40m}{display=HT40-}
  153. value {arg=1}{value=ht20}{display=HT20}
  154. value {arg=2}{value=wlan0}{display=wlan0}</pre>
  155. </div>
  156. </div>
  157. <div class="paragraph">
  158. <p>Example 2:</p>
  159. </div>
  160. <div class="literalblock">
  161. <div class="content">
  162. <pre>arg {number=0}{call=--usbdevice}{USB Device}{type=selector}
  163. value {arg=0}{call=/dev/sysfs/usb/foo/123}{display=Ubertooth One sn 1234}
  164. value {arg=0}{call=/dev/sysfs/usb/foo/456}{display=Ubertooth One sn 8901}</pre>
  165. </div>
  166. </div>
  167. <div class="paragraph">
  168. <p>Example 3:</p>
  169. </div>
  170. <div class="literalblock">
  171. <div class="content">
  172. <pre>arg {number=0}{call=--usbdevice}{USB Device}{type=selector}
  173. arg {number=1}{call=--server}{display=IP address for log server}{type=string}{validation=(?:\d{1,3}\.){3}\d{1,3}}
  174. flag {failure=Permission denied opening Ubertooth device}</pre>
  175. </div>
  176. </div>
  177. <div class="paragraph">
  178. <p>Example 4:</p>
  179. </div>
  180. <div class="literalblock">
  181. <div class="content">
  182. <pre>arg {number=0}{call=--username}{display=Username}{type=string}
  183. arg {number=1}{call=--password}{display=Password}{type=password}</pre>
  184. </div>
  185. </div>
  186. <div class="paragraph">
  187. <p>Example 5:</p>
  188. </div>
  189. <div class="literalblock">
  190. <div class="content">
  191. <pre>arg {number=0}{call=--start}{display=Start Time}{type=timestamp}
  192. arg {number=1}{call=--end}{display=End Time}{type=timestamp}</pre>
  193. </div>
  194. </div>
  195. </div>
  196. </div>
  197. <div class="sect1">
  198. <h2 id="_security_considerations">Security Considerations</h2>
  199. <div class="sectionbody">
  200. <div class="ulist">
  201. <ul>
  202. <li>
  203. <p>If you&#8217;re running Wireshark as root, we can&#8217;t save you.</p>
  204. </li>
  205. <li>
  206. <p>Dumpcap retains suid/setgid and group execute permissions for users in the “wireshark” group only.</p>
  207. </li>
  208. <li>
  209. <p>Third-party capture programs run with whatever privileges they&#8217;re installed with.</p>
  210. </li>
  211. <li>
  212. <p>If an attacker can write to a system binary directory, it&#8217;s game over.</p>
  213. </li>
  214. <li>
  215. <p>You can find your local extcap directory in <span class="menuseq"><b class="menu">About</b>&#160;<b class="caret">&#8250;</b> <b class="menuitem">Folders</b></span>.</p>
  216. </li>
  217. </ul>
  218. </div>
  219. </div>
  220. </div>
  221. <div class="sect1">
  222. <h2 id="_see_also">SEE ALSO</h2>
  223. <div class="sectionbody">
  224. <div class="paragraph">
  225. <p><a href="wireshark.html">wireshark</a>(1), <a href="tshark.html">tshark</a>(1), <a href="dumpcap.html">dumpcap</a>(1), <a href="androiddump.html">androiddump</a>(1), <a href="sshdump.html">sshdump</a>(1), <a href="randpktdump.html">randpktdump</a>(1)</p>
  226. </div>
  227. </div>
  228. </div>
  229. <div class="sect1">
  230. <h2 id="_notes">NOTES</h2>
  231. <div class="sectionbody">
  232. <div class="paragraph">
  233. <p><strong>Extcap</strong> is feature of <strong>Wireshark</strong>.
  234. The latest version of <strong>Wireshark</strong> can be found at <a href="https://www.wireshark.org" class="bare">https://www.wireshark.org</a>.</p>
  235. </div>
  236. <div class="paragraph">
  237. <p>HTML versions of the Wireshark project man pages are available at
  238. <a href="https://www.wireshark.org/docs/man-pages" class="bare">https://www.wireshark.org/docs/man-pages</a>.</p>
  239. </div>
  240. </div>
  241. </div>
  242. </div>
  243. </body>
  244. </html>