Monday 20 June 2016

Tools for protocol testing

Tools for Protocol Testing

Lets discuss the most important testing tools used to verify protocols

Scapy For Packet Crafting

Scapy is a powerful interactive packet manipulation program. It enable you to
  • Create packets
  • Decode packets on the network
  • Capture packets and analyze them
  • Inject packets into the network
So, basically scapy mainly does two things: receiving answers and sending packets. You define the packets, it sends them, receives answers, match requests with answers and returns a list of packet couples and a list of unmatched packets.
It can also handle other things as well like trace-routing, unit tests, attacks or network discovery, developing new protocols, probing, etc.
Scapy enable us to write a python script that allow us to perform a task like sending and receiving packets or sniffing packets. For example, scapy can sniff the data packet by using python script. The command to open the getdit entered in the editor
#gedit scapysniff.py
#!/usr/bin/env python
from scapy.all import*
a= sniff(count=10)
a.nsummary()
save, and change the mode of the file into an executable form
#chmod+x scapysniff.py
# ./scaotsbuff.py
It will sniff 10 packets and soon as it has sniffed 10 packets it will print the summary. Scapy also as an array of command for sending and receiving packets at the same time
Download Scapy

Wireshark Tools For Analysis

Tools used for protocol testing- WireShark . It allows to capture packets in real time and display them in human readable form. It allows you to dig deep into the network traffic and inspect individual packets by using color coding and filters.
Wireshark captures packets that helps to determine when the session is getting established, when the exact data travel was initiated and how much data is sent each time, etc.
Wireshark has a set of rich features which includes
  • Thorough inspection of hundreds of protocols, more being added all the time
  • Live capture and offline analysis
  • Rich VoIP analysis
  • Standard three pane packed browser
  • Runs on multi-platforms like Windows, Linux, OSX and so on
  • Captured network data can be browsed via a GUI
  • Decryption support many protocols like IPsec, ISAKMP, SSL/TLS
  • Live data can be read from Ethernet, ATM, Bluetooth, USB, token etc.
  • Output can be exported to CSV, XML, plain text, etc.
Download Wireshark

TTCN

TCCN is a standard testing language for defining test scenario and their implementation for protocol testing. A TCCN test suite contains many test cases written in the TTCN programming language and it is used for testing reactive systems or behavioral testing.
For example, a coffee vending machine that gives you coffee on inserting a dollar coin but does not respond if anything less than dollar in inserted into it. To program such machines TCCN3 language is used. In order to make coffee machine responds when inserting a coin we have to write TCCN-3 component that behaves as a coffee machine. It allow us to run our test before actual coffee machine is available as a product. Once it is done we will connect the TCCN3 test suite with the external device.
The test system emits stimuli (dollar coin) and receives responses (coffee). The stimuli adapter obtains stimuli from the test system and passes them to the system under test. The response adapter waits for responses of the system under test and passes them to the test system.
TCCN3 can be used in various fields like
  • Mobile communications (LTE, WIMAX, 3G etc)
  • Broadband technologies (ATM,DSL)
  • Middleware Platforms (Webservices, CORBA etc)
  • Internet Protocol ( SIP, IMS, IPv6)
  • Smart Cards
  • Automative (AutoSAR, MOST, CAN)
In TCCN we can define
  • Test Suites
  • Test Cases
  • Test Steps
  • Declare Variables
  • Declare Timers
  • Create PDUs etc.
TCCN can be integrated with types systems of other languages like ASN.1, XML , C/ C++ . TCCN3 core language exists in text format apart from other format like tabular, graphical and presentation.

No comments:

Post a Comment