Giter Site home page Giter Site logo

seaowl / wireshark-remote-command-win Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jaytwolab/wireshark-remote-command-win

0.0 0.0 0.0 37 KB

Wireshark remote command for Windows :kr: 윈도우즈에서 와이어샤크를 이용한 원격 패킷 캡춰

Home Page: https://j2doll.github.io/wireshark-remote-command-win/

License: MIT License

Batchfile 100.00%

wireshark-remote-command-win's Introduction

Capturing remote packet using Wireshark on Windows

Read this in other languages: English, 한국어

Concept

  • It is a command to capture packets in the following environment.
  • If your Linux has no GUI, analyzing packets is difficult.
  • You can use this commnad file, then you can perform analysis in Windows.

Windows (My PC, Host OS)

Linux (Remote System, Target OS)

  • How to install program
  • tcpdump
    • sudo yum install tupcump (Fedora, CentOS, Redhat)
    • sudo apt-get install tcpdump (Ubuntu, Debian)
    • Or install using source code http://www.tcpdump.org/
  • pcap
    • Most of cases are installed together when you install tcpdump.
    • sudo yum install libpcap (Fedora, CentOS, Redhat)
    • sudo apt-get install libpcap (Ubuntu, Debian)
  • ssh
    • Install OpenSSH server
      • sudo apt-get install openssh-server (Ubuntu)
        • sudo service ssh status (check openssh server)
        • sudo service ssh restart (restart openssh server)
      • sudo dnf install openssh-server (Fedora. you can use yum install openssh-server)
        • sudo systemctl start sshd.service (start openssh server)
        • sudo systemctl enable sshd.service (enable openssh server)

Create command file on Windows

  • Build the command file(*.cmd) as follows:
@REM ----------------------------------------------------
@REM remotecap.cmd
@REM   Example command for captruing eremote network packet
@REM  using wireshark and tcpdump.
@REM   First written by j2doll. September 10th 2016.
@REM   https://github.com/j2doll/wireshark-remote-command-win
@REM   http://j2doll.tistory.com
@REM ----------------------------------------------------
@REM install putty and wireshark on your windows pc.
@SET PLINK_PATH="C:\Program Files\PuTTY\plink.exe"
@SET WIRESHARK_PATH="C:\Program Files\Wireshark\Wireshark.exe"
@SET REMOTE_SERVER=192.168.0.10
@SET REMOTE_ACCOUNT=root
@SET REMOTE_PASSWORD=password1234
@SET REMOTE_INTERFACE=eth0
@REM execute command
%PLINK_PATH% -ssh -pw %REMOTE_PASSWORD% %REMOTE_ACCOUNT%@%REMOTE_SERVER% "tcpdump -s0 -U -w - -i %REMOTE_INTERFACE% not port 22" | %WIRESHARK_PATH% -i - -k
  • You can fix variables for your environemnt.
    • Your Linux
      • REMOTE_SERVER : linux ip (such as 192.168.137.18)
      • REMOTE_ACCOUNT : linux account
      • REMOTE_PASSWORD : password of linux account
      • REMOTE_INTERFACE : linux ethernet interface (such as eth0, wlan0, etc)
        • If you don't know this, type command 'ifconfig' on your linux.
    • Your Windows
      • WIRESHARK_PATH : This is where you installed wireshark execute file (wireshark.exe).
      • PLINK_PATH : This is where you installed putty plink execute file (plink.exe).

How to capture packet

  • Just run 'remotecap.cmd' on Windows. Windows may ask to you about firewall policy of Windows.

Contact

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.