wifidump.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448
  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>wifidump(1)</title>
  9. <link rel="stylesheet" href="./ws.css">
  10. </head>
  11. <body class="manpage">
  12. <div id="header">
  13. <h1>wifidump(1) Manual Page</h1>
  14. <h2 id="_name">NAME</h2>
  15. <div class="sectionbody">
  16. <p>wifidump - Provides an interface to capture Wi-Fi frames from a remote host through SSH.</p>
  17. </div>
  18. </div>
  19. <div id="content">
  20. <div class="sect1">
  21. <h2 id="_synopsis">SYNOPSIS</h2>
  22. <div class="sectionbody">
  23. <div class="paragraph">
  24. <p><span class="nowrap"><strong>wifidump</strong></span>
  25. <span class="nowrap">[ <strong>--help</strong> ]</span>
  26. <span class="nowrap">[ <strong>--version</strong> ]</span>
  27. <span class="nowrap">[ <strong>--extcap-interfaces</strong> ]</span>
  28. <span class="nowrap">[ <strong>--extcap-dlts</strong> ]</span>
  29. <span class="nowrap">[ <strong>--extcap-interface</strong>=&lt;interface&gt; ]</span>
  30. <span class="nowrap">[ <strong>--extcap-config</strong> ]</span>
  31. <span class="nowrap">[ <strong>--extcap-capture-filter</strong>=&lt;capture filter&gt; ]</span>
  32. <span class="nowrap">[ <strong>--capture</strong> ]</span>
  33. <span class="nowrap">[ <strong>--fifo</strong>=&lt;path to file or pipe&gt; ]</span>
  34. <span class="nowrap">[ <strong>--remote-host</strong>=&lt;IP address&gt; ]</span>
  35. <span class="nowrap">[ <strong>--remote-port</strong>=&lt;TCP port&gt; ]</span>
  36. <span class="nowrap">[ <strong>--remote-username</strong>=&lt;username&gt; ]</span>
  37. <span class="nowrap">[ <strong>--remote-password</strong>=&lt;password&gt; ]</span>
  38. <span class="nowrap">[ <strong>--sshkey</strong>=&lt;public key path&gt; ]</span>
  39. <span class="nowrap">[ <strong>--remote-interface</strong>=&lt;interface&gt; ]</span>
  40. <span class="nowrap">[ <strong>--remote-channel-frequency</strong>=&lt;channel frequency&gt; ]</span>
  41. <span class="nowrap">[ <strong>--remote-channel-width</strong>=&lt;channel width&gt; ]</span></p>
  42. </div>
  43. <div class="paragraph">
  44. <p><span class="nowrap"><strong>wifidump</strong></span>
  45. <span class="nowrap"><strong>--extcap-interfaces</strong></span></p>
  46. </div>
  47. <div class="paragraph">
  48. <p><span class="nowrap"><strong>wifidump</strong></span>
  49. <span class="nowrap"><strong>--extcap-interface</strong>=&lt;interface&gt;</span>
  50. <span class="nowrap"><strong>--extcap-dlts</strong></span></p>
  51. </div>
  52. <div class="paragraph">
  53. <p><span class="nowrap"><strong>wifidump</strong></span>
  54. <span class="nowrap"><strong>--extcap-interface</strong>=&lt;interface&gt;</span>
  55. <span class="nowrap"><strong>--extcap-config</strong></span></p>
  56. </div>
  57. <div class="paragraph">
  58. <p><span class="nowrap"><strong>wifidump</strong></span>
  59. <span class="nowrap"><strong>--extcap-interface</strong>=&lt;interface&gt;</span>
  60. <span class="nowrap"><strong>--fifo</strong>=&lt;path to file or pipe&gt;</span>
  61. <span class="nowrap"><strong>--capture</strong></span>
  62. <span class="nowrap"><strong>--remote-host=myremotehost</strong></span>
  63. <span class="nowrap"><strong>--remote-port=22</strong></span>
  64. <span class="nowrap"><strong>--remote-username=user</strong></span>
  65. <span class="nowrap"><strong>--remote-interface=eth2</strong></span>
  66. <span class="nowrap"><strong>--remote-channel-frequency=5180</strong></span>
  67. <span class="nowrap"><strong>--remote-channel-width=40</strong></span></p>
  68. </div>
  69. </div>
  70. </div>
  71. <div class="sect1">
  72. <h2 id="_description">DESCRIPTION</h2>
  73. <div class="sectionbody">
  74. <div class="paragraph">
  75. <p><strong>Wifidump</strong> is an extcap tool that allows you to capture Wi-Fi traffic from a
  76. remote host over an SSH connection using <strong>tcpdump</strong>. The requirement to capture Wi-Fi
  77. frames is that the remote host must have the necessary binaries to manage and put
  78. the wanted interface into monitor mode. Such binaries include: <strong>ip</strong>, <strong>iw</strong>, and
  79. <strong>iwconfig</strong>. Also, because using monitor mode and managing the Wi-Fi interface requires
  80. root privileges, the system must be configured to allow the wanted user to run
  81. these binaries using sudo without entering a password.</p>
  82. </div>
  83. <div class="paragraph">
  84. <p>Typically wifidump is not invoked directly. Instead it can be configured through
  85. the Wireshark graphical user interface or its command line. The following will
  86. start Wireshark and start capturing from host <strong>remotehost</strong>:</p>
  87. </div>
  88. <div class="literalblock">
  89. <div class="content">
  90. <pre>$ wireshark '-oextcap.wifidump.remotehost:remotehost' -i wifidump -k</pre>
  91. </div>
  92. </div>
  93. <div class="paragraph">
  94. <p>To explicitly control the remote capture command:</p>
  95. </div>
  96. <div class="literalblock">
  97. <div class="content">
  98. <pre>$ wireshark '-oextcap.wifidump.remotehost:remotehost' \
  99. '-oextcap.wifidump.remotechannelfrequency:5180' \
  100. '-oextcap.wifidump.remotechannelwidth:40' \
  101. -i wifidump -k</pre>
  102. </div>
  103. </div>
  104. <div class="paragraph">
  105. <p>Supported interfaces:</p>
  106. </div>
  107. <div class="olist arabic">
  108. <ol class="arabic">
  109. <li>
  110. <p>wifidump</p>
  111. </li>
  112. </ol>
  113. </div>
  114. </div>
  115. </div>
  116. <div class="sect1">
  117. <h2 id="_options">OPTIONS</h2>
  118. <div class="sectionbody">
  119. <div class="dlist">
  120. <dl>
  121. <dt class="hdlist1">--help</dt>
  122. <dd>
  123. <div class="openblock">
  124. <div class="content">
  125. <div class="paragraph">
  126. <p>Print program arguments.</p>
  127. </div>
  128. </div>
  129. </div>
  130. </dd>
  131. <dt class="hdlist1">--version</dt>
  132. <dd>
  133. <div class="openblock">
  134. <div class="content">
  135. <div class="paragraph">
  136. <p>Print program version.</p>
  137. </div>
  138. </div>
  139. </div>
  140. </dd>
  141. <dt class="hdlist1">--extcap-interfaces</dt>
  142. <dd>
  143. <div class="openblock">
  144. <div class="content">
  145. <div class="paragraph">
  146. <p>List available interfaces.</p>
  147. </div>
  148. </div>
  149. </div>
  150. </dd>
  151. <dt class="hdlist1">--extcap-interface=&lt;interface&gt;</dt>
  152. <dd>
  153. <div class="openblock">
  154. <div class="content">
  155. <div class="paragraph">
  156. <p>Use specified interfaces.</p>
  157. </div>
  158. </div>
  159. </div>
  160. </dd>
  161. <dt class="hdlist1">--extcap-dlts</dt>
  162. <dd>
  163. <div class="openblock">
  164. <div class="content">
  165. <div class="paragraph">
  166. <p>List DLTs of specified interface.</p>
  167. </div>
  168. </div>
  169. </div>
  170. </dd>
  171. <dt class="hdlist1">--extcap-config</dt>
  172. <dd>
  173. <div class="openblock">
  174. <div class="content">
  175. <div class="paragraph">
  176. <p>List configuration options of specified interface.</p>
  177. </div>
  178. </div>
  179. </div>
  180. </dd>
  181. <dt class="hdlist1">--capture</dt>
  182. <dd>
  183. <div class="openblock">
  184. <div class="content">
  185. <div class="paragraph">
  186. <p>Start capturing from specified interface and write raw packet data to the location specified by --fifo.</p>
  187. </div>
  188. </div>
  189. </div>
  190. </dd>
  191. <dt class="hdlist1">--fifo=&lt;path to file or pipe&gt;</dt>
  192. <dd>
  193. <div class="openblock">
  194. <div class="content">
  195. <div class="paragraph">
  196. <p>Save captured packet to file or send it through pipe.</p>
  197. </div>
  198. </div>
  199. </div>
  200. </dd>
  201. <dt class="hdlist1">--remote-host=&lt;remote host&gt;</dt>
  202. <dd>
  203. <div class="openblock">
  204. <div class="content">
  205. <div class="paragraph">
  206. <p>The address of the remote host for capture.</p>
  207. </div>
  208. </div>
  209. </div>
  210. </dd>
  211. <dt class="hdlist1">--remote-port=&lt;remote port&gt;</dt>
  212. <dd>
  213. <div class="openblock">
  214. <div class="content">
  215. <div class="paragraph">
  216. <p>The SSH port of the remote host.</p>
  217. </div>
  218. </div>
  219. </div>
  220. </dd>
  221. <dt class="hdlist1">--remote-username=&lt;username&gt;</dt>
  222. <dd>
  223. <div class="openblock">
  224. <div class="content">
  225. <div class="paragraph">
  226. <p>The username for ssh authentication.</p>
  227. </div>
  228. </div>
  229. </div>
  230. </dd>
  231. <dt class="hdlist1">--remote-password=&lt;password&gt;</dt>
  232. <dd>
  233. <div class="openblock">
  234. <div class="content">
  235. <div class="paragraph">
  236. <p>The password to use (if not ssh-agent and pubkey are used). WARNING: the
  237. passwords are stored in plaintext and visible to all users on this system. It is
  238. recommended to use keyfiles with a SSH agent.</p>
  239. </div>
  240. </div>
  241. </div>
  242. </dd>
  243. <dt class="hdlist1">--sshkey=&lt;SSH private key path&gt;</dt>
  244. <dd>
  245. <div class="openblock">
  246. <div class="content">
  247. <div class="paragraph">
  248. <p>The path to a private key for authentication.</p>
  249. </div>
  250. </div>
  251. </div>
  252. </dd>
  253. <dt class="hdlist1">--remote-interface=&lt;remote interface&gt;</dt>
  254. <dd>
  255. <div class="openblock">
  256. <div class="content">
  257. <div class="paragraph">
  258. <p>The remote network interface to capture from.</p>
  259. </div>
  260. </div>
  261. </div>
  262. </dd>
  263. <dt class="hdlist1">--remote-channel-frequency=&lt;channel frequency&gt;</dt>
  264. <dd>
  265. <div class="openblock">
  266. <div class="content">
  267. <div class="paragraph">
  268. <p>The remote channel frequency in MHz.</p>
  269. </div>
  270. </div>
  271. </div>
  272. </dd>
  273. <dt class="hdlist1">--remote-channel-width=&lt;channel width&gt;</dt>
  274. <dd>
  275. <div class="openblock">
  276. <div class="content">
  277. <div class="paragraph">
  278. <p>The remote channel width in MHz.</p>
  279. </div>
  280. </div>
  281. </div>
  282. </dd>
  283. <dt class="hdlist1">--extcap-capture-filter=&lt;capture filter&gt;</dt>
  284. <dd>
  285. <div class="openblock">
  286. <div class="content">
  287. <div class="paragraph">
  288. <p>The capture filter. It corresponds to the value provided via the <strong>tshark -f</strong>
  289. option, and the Capture Filter field next to the interfaces list in the
  290. Wireshark interface.</p>
  291. </div>
  292. </div>
  293. </div>
  294. </dd>
  295. </dl>
  296. </div>
  297. </div>
  298. </div>
  299. <div class="sect1">
  300. <h2 id="_examples">EXAMPLES</h2>
  301. <div class="sectionbody">
  302. <div class="paragraph">
  303. <p>To see program arguments:</p>
  304. </div>
  305. <div class="literalblock">
  306. <div class="content">
  307. <pre>wifidump --help</pre>
  308. </div>
  309. </div>
  310. <div class="paragraph">
  311. <p>To see program version:</p>
  312. </div>
  313. <div class="literalblock">
  314. <div class="content">
  315. <pre>wifidump --version</pre>
  316. </div>
  317. </div>
  318. <div class="paragraph">
  319. <p>To see interfaces:</p>
  320. </div>
  321. <div class="literalblock">
  322. <div class="content">
  323. <pre>wifidump --extcap-interfaces</pre>
  324. </div>
  325. </div>
  326. <div class="paragraph">
  327. <p>Only one interface (wifidump) is supported.</p>
  328. </div>
  329. <div class="literalblock">
  330. <div class="title">Example output</div>
  331. <div class="content">
  332. <pre>interface {value=wifidump}{display=Wi-Fi remote capture}</pre>
  333. </div>
  334. </div>
  335. <div class="paragraph">
  336. <p>To see interface DLTs:</p>
  337. </div>
  338. <div class="literalblock">
  339. <div class="content">
  340. <pre>wifidump --extcap-interface=wifidump --extcap-dlts</pre>
  341. </div>
  342. </div>
  343. <div class="literalblock">
  344. <div class="title">Example output</div>
  345. <div class="content">
  346. <pre>dlt {number=147}{name=wifidump}{display=Remote capture dependent DLT}</pre>
  347. </div>
  348. </div>
  349. <div class="paragraph">
  350. <p>To see interface configuration options:</p>
  351. </div>
  352. <div class="literalblock">
  353. <div class="content">
  354. <pre>wifidump --extcap-interface=wifidump --extcap-config</pre>
  355. </div>
  356. </div>
  357. <div class="literalblock">
  358. <div class="title">Example output</div>
  359. <div class="content">
  360. <pre>arg {number=0}{call=--remote-host}{display=Remote SSH server address}{type=string}
  361. {tooltip=The remote SSH host. It can be both an IP address or a hostname}{required=true}{group=Server}
  362. arg {number=1}{call=--remote-port}{display=Remote SSH server port}{type=unsigned}
  363. {tooltip=The remote SSH host port (1-65535)}{range=1,65535}{group=Server}
  364. arg {number=2}{call=--remote-username}{display=Remote SSH server username}{type=string}
  365. {tooltip=The remote SSH username. If not provided, the current user will be used}{group=Authentication}
  366. arg {number=3}{call=--remote-password}{display=Remote SSH server password}{type=password}
  367. {tooltip=The SSH password, used when other methods (SSH agent or key files) are unavailable.}{group=Authentication}
  368. arg {number=4}{call=--sshkey}{display=Path to SSH private key}{type=fileselect}
  369. {tooltip=The path on the local filesystem of the private ssh key}{mustexist=true}{group=Authentication}
  370. arg {number=5}{call=--sshkey-passphrase}{display=SSH key passphrase}{type=password}
  371. {tooltip=Passphrase to unlock the SSH private key}{group=Authentication}
  372. arg {number=6}{call=--remote-interface}{display=Remote interface}{type=string}
  373. {tooltip=The remote network interface used to capture}{default=auto}{group=Capture}
  374. arg {number=7}{call=--remote-channel-frequency}{display=Remote channel}{type=selector}
  375. {tooltip=The remote channel used to capture}{group=Capture}
  376. arg {number=8}{call=--remote-channel-width}{display=Remote channel width}{type=selector}
  377. {tooltip=The remote channel width used to capture}{group=Capture}
  378. arg {number=9}{call=--remote-filter}{display=Remote capture filter}{type=string}
  379. {tooltip=The remote capture filter}{group=Capture}
  380. arg {number=10}{call=--remote-count}{display=Packets to capture}{type=unsigned}
  381. {tooltip=The number of remote packets to capture.}{group=Capture}
  382. arg {number=11}{call=--log-level}{display=Set the log level}{type=selector}
  383. {tooltip=Set the log level}{required=false}{group=Debug}
  384. arg {number=12}{call=--log-file}{display=Use a file for logging}{type=fileselect}
  385. {tooltip=Set a file where log messages are written}{required=false}{group=Debug}</pre>
  386. </div>
  387. </div>
  388. <div class="paragraph">
  389. <p>To capture:</p>
  390. </div>
  391. <div class="literalblock">
  392. <div class="content">
  393. <pre>wifidump --extcap-interface=wifidump --fifo=/tmp/wifidump.pcap --capture --remote-host 192.168.1.10 --remote-username user --remote-channel-frequency 5180 --remote-channel-width 40</pre>
  394. </div>
  395. </div>
  396. <div class="admonitionblock note">
  397. <table>
  398. <tr>
  399. <td class="icon">
  400. <div class="title">Note</div>
  401. </td>
  402. <td class="content">
  403. To stop capturing CTRL+C/kill/terminate application.
  404. </td>
  405. </tr>
  406. </table>
  407. </div>
  408. <div class="paragraph">
  409. <p>The wifidump binary can be renamed to support multiple instances. For instance if we want wifidump
  410. to show up twice in wireshark (for instance to handle multiple profiles), we can copy wifidump to
  411. wifidump-host1 and wifidump-host2. Each binary will show up an interface name same as the executable
  412. name. Those executables not being "wifidump" will show up as "custom version" in the interface description.</p>
  413. </div>
  414. </div>
  415. </div>
  416. <div class="sect1">
  417. <h2 id="_see_also">SEE ALSO</h2>
  418. <div class="sectionbody">
  419. <div class="paragraph">
  420. <p><a href="wireshark.html">wireshark</a>(1), <a href="tshark.html">tshark</a>(1), <a href="extcap.html">extcap</a>(4), <a href="https://www.tcpdump.org/manpages/tcpdump.1.html">tcpdump</a>(1)</p>
  421. </div>
  422. </div>
  423. </div>
  424. <div class="sect1">
  425. <h2 id="_notes">NOTES</h2>
  426. <div class="sectionbody">
  427. <div class="paragraph">
  428. <p><strong>Wifidump</strong> is part of the <strong>Wireshark</strong> distribution. The latest version
  429. of <strong>Wireshark</strong> can be found at <a href="https://www.wireshark.org" class="bare">https://www.wireshark.org</a>.</p>
  430. </div>
  431. <div class="paragraph">
  432. <p>HTML versions of the Wireshark project man pages are available at
  433. <a href="https://www.wireshark.org/docs/man-pages" class="bare">https://www.wireshark.org/docs/man-pages</a>.</p>
  434. </div>
  435. </div>
  436. </div>
  437. <div class="sect1">
  438. <h2 id="_authors">AUTHORS</h2>
  439. <div class="sectionbody">
  440. <div class="paragraph">
  441. <div class="title">Original Author</div>
  442. <p>Adrian Granados &lt;adrian[AT]intuitibits.com&gt;</p>
  443. </div>
  444. </div>
  445. </div>
  446. </div>
  447. </body>
  448. </html>