deeejay

Bash - Wireshark Remote Packet Capture

Jun 17th, 2016
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.91 KB | None | 0 0
  1. RHEL6 Requirements:
  2. geoip-1.4.6-1.el6.rf.x86_64.rpm
  3. libsmi-0.4.8-4.el6.x86_64.rpm
  4. wireshark-1.10.0-1.el6.rft.x86_64.rpm
  5. wireshark-gnome-1.10.0-1.el6.rft.x86_64.rpm
  6. zlib-1.2.3-29.el6.x86_64.rpm
  7.  
  8. For remote capture readings:
  9. coreutils-8.4-43.el6.x86_64.rpm
  10. coreutils-libs-8.4-43.el6.x86_64.rpm
  11.  
  12.  
  13. Create a named pipe:
  14. mkfifo /tmp/packet_capture
  15.  
  16. Start wireshark from the command line
  17. wireshark -k -i /tmp/packet_capture
  18.  
  19. Run tcpdump over ssh on your remote machine and redirect the packets to the named pipe (find the eth interface):
  20. ssh root@source-hostname "tcpdump -s 0 -U -n -w - -i eth0 not port 22" > /tmp/packet_capture
  21.  
  22. Source: http://blog.nielshorn.net/2010/02/using-wireshark-with-remote-capturing/
  23.  
  24. Filters
  25. ===
  26.  
  27. Find duplicate ip addresses:
  28. arp.duplicate-address-detected
  29.  
  30. Exclude a destination ip address
  31. NOT(ip.dst == 10.15.30.114)
  32.  
  33. Exclude a source ip address
  34. NOT(ip.src == 10.15.30.114)
Add Comment
Please, Sign In to add comment