Skip to main content

Packet capturing of different protocols using Wireshark

Wireshark is the world’s foremost and widely-used network protocol analyzer. It is used for network troubleshooting, analysis, software and communications protocol development, and education.

It is a free and an open-source packet analyzer.It is cross-platform.

  • To trace the packets first of all download and install Wireshark in the windows operating system.


  • Open Wireshark and then choose the interface.

1.Tracking FTP Packets


Step 1: $sudo apt-get install vsftpd command on Ubuntu terminal


Step 2: Start Wireshark and open command prompt in windows.
In the command prompt enter the IP address of Ubuntu Machine.

It asks for username and password authentication for the Ubuntu machine.

Step 3: Start capturing by clicking the green button in Wireshark.

 Step 4: In the filter of Wireshark,  enter ftp followed by IP address to track.

Step 5: Press the red button to stop capturing.




This server is not secure because packet transmission was captured in plain text as given by the user and even the password was captured unencrypted.


    2.Tracking Telnet packets


Step 1:$ sudo apt-get install telnetd ( on Ubuntu Machine)
Step 2: $ sudo /etc/init.d/openbsd-inetd restart  (on Ubuntu Machine)
Step 3: Now on the windows machine,
In the command prompt enter telnet followed by the IP address of Ubuntu Machine.

It asks for username and password authentication for the      Ubuntu machine.

Step 4: Start capturing by clicking the green button.

 Step 5: In the filter of Wireshark,  enter telnet followed by IP address to track.


Step 6: Press the red button to stop.


Here the password given for authentication is visible in plain text so it is not secure like ftp but gives a little security than ftp as the packets are not transmitted in plain text but under the name ‘Telnet Data’.


      3.Tracking on OpenSSH Server

 Step 1: $sudo apt-get install openssh-server (on Ubuntu Machine)

Step 2: Install putty on the windows machine and enter the host IP address(Ubuntu IP address) in it to connect

 Step 3: open Wireshark and search using the filter “tcp.port == 22 and ip.addr == <ip address of Ubuntu Machine>”,  22 is the port number of SSH




The telnet or ftp, are insecure and transmit the user's password in cleartext when used. OpenSSH provides a server daemon and client tools to facilitate secure, encrypted remote control and file transfer operations, effectively replacing the legacy tools.Here the packets are transmitted in encrypted form.

Comments

Popular posts from this blog

Network Layer

Network Layer(Layer 3):  It is responsible for the source-to-destination delivery of packets across multiple links(networks).It is also responsible for structuring and managing a multi-node network, including addressing, routing, and traffic control. Functions include: Logical Addressing: IP addressing is defined at the Network Layer of the OSI model. This layer adds a header to the packet coming from the upper layer that, among other things, indicates the logical addresses of the sender and receiver. IP addressing is also known as logical addressing. Routing: When independent networks are connected together to create a large network, the connecting devices(routers/gateways) route the packets to their final destination. The decision which route/path should be followed to reach from source to destination is handled by the network layer. 

What is a Network Hub?

Hub is the most simple networking device which is used to connect all network devices on an internal network. It detects whether a device is physically connected to it or not. It is a Layer 1 device in OSI reference model and is best for small and simple local area networks. It is not intelligent because it does not filter any data. When a packet is received by one port, the data is copied to all other ports and is seen by all connected devices. It has 4/12 ports . Drawbacks of Hubs are:- Rebroadcast- Forwards packets across all ports. Creates Security concerns- Traffic could not be safeguarded. Unnecessary traffic which reduces bandwidth.   

Types of Network

What is a Network ? A Network is defined as an arrangement of a set of devices connected together by communication links for the purpose of sharing data. Each device may be called as a node which can be a computer, printer or any other devices capable of sending or receiving data generated by other nodes or devices on the network. Following are the types of Network:- 1. Local Area Network(LAN): LANs are privately owned networks defined within a small physical area such as in a single office, building or campus. LAN size is limited to a few kilometers for which the network management is simple.   Most common LAN topologies are bus, ring, star and have data rates in the range of 4 to 16 megabits per second. LANs often use a transmission technology consisting of a single cable to which all the machines are attached. LANs are mostly used to allow resources to be shared among personal computers or workstations. 2. Metropolitan Area Network(MAN): A MAN is des...