HP Service Virtualization



Similar documents
The Answer to the 14 Most Frequently Asked Modbus Questions

TCP Session Management (SesM) Protocol Specification

ModScan A SCADA MODBUS Network Scanner. Mark Bristow mark.bristow@gmail.com

Chapter 4: Computer Codes

Chapter 14 Analyzing Network Traffic. Ed Crowley

Cluster APIs. Cluster APIs

Configuring the Bundled SESM RADIUS Server

Packet Capture. Document Scope. SonicOS Enhanced Packet Capture

Application Firewall Configuration Examples

2011, The McGraw-Hill Companies, Inc. Chapter 3

TCP Packet Tracing Part 1

NAT TCP SIP ALG Support

Peach Fuzzer Platform

Exam 1 Review Questions

Kiwi SyslogGen. A Freeware Syslog message generator for Windows. by SolarWinds, Inc.

Procedure: You can find the problem sheet on Drive D: of the lab PCs. 1. IP address for this host computer 2. Subnet mask 3. Default gateway address

Turquoise Equities. TQ401 - Level 2 MITCH UDP Market Data. Issue November 2015

AQA GCSE in Computer Science Computer Science Microsoft IT Academy Mapping

Moven Studio realtime. streaming

µtasker Document FTP Client

Configuration of the DHCP server

Active Directory Integration with Blue Coat

SQL Server An Overview

Network Security: Workshop

Lab Module 3 Network Protocol Analysis with Wireshark

Mobile IP Network Layer Lesson 02 TCP/IP Suite and IP Protocol

4D Plugin SDK v11. Another minor change, real values on 10 bytes is no longer supported.

Einführung in SSL mit Wireshark

Lab Exercise SSL/TLS. Objective. Step 1: Open a Trace. Step 2: Inspect the Trace

RNPP: Remote NotePad Protocol. Computer Networking Program. Protocol Specifications. October Prepared for

Using DC Agent for Transparent User Identification

eztcp Technical Document Modbus/TCP of eztcp Caution: Specifications of this document may be changed without prior notice for improvement.

Lab Exercise Objective. Requirements. Step 1: Fetch a Trace

EKT 332/4 COMPUTER NETWORK

Positional Numbering System

Configuring System Message Logging

LabVIEW Internet Toolkit User Guide

Avid Technology, Inc. inews NRCS. inews FTP Server Protocol Specification. Version January 2006

NETWORK ADMINISTRATION

Technical Support Bulletin Nr.18 Modbus Tips

Intel Hexadecimal Object File Format Specification Revision A, 1/6/88

A White Paper about. MiniSEED for LISS and data compression using Steim1 and Steim2

Enhanced Connector Applications SupportPac VP01 for IBM WebSphere Business Events 3.0.0

Deploying HIDS Client to Windows Hosts

Date 07/05/ :20:22. CENTREL Solutions. Author. Version Product XIA Configuration Server [ ]

Base Conversion written by Cathy Saxton

Bachelors of Computer Application Programming Principle & Algorithm (BCA-S102T)

Configuring DHCP and DNS Services

Mike Canney. Application Performance Analysis

KMx Enterprise: Integration Overview for Member Account Synchronization and Single Signon

MODBUS APPLICATION PROTOCOL SPECIFICATION V1.1b CONTENTS

Lab Exercise SSL/TLS. Objective. Requirements. Step 1: Capture a Trace

The Hexadecimal Number System and Memory Addressing

Application Detection

Figure 1. Wireshark Menu Bar

Chapter Binary, Octal, Decimal, and Hexadecimal Calculations

Data Storage: Each time you create a variable in memory, a certain amount of memory is allocated for that variable based on its data type (or class).

Energy Management System CANBUS Interface Specification

Logging. Working with the POCO logging framework.

ISE TACACS+ Configuration Guide for Cisco NX-OS Based Network Devices. Secure Access How-to User Series

Virtual Integrated Design Getting started with RS232 Hex Com Tool v6.0

EE122 Project 2B: P2P tiny World of Warcraft. Instructor: Prof. Ion Stoica

SURF HMP getting started guide

TCP/IP Networking, Part 2: Web-Based Control

Japannext PTS ITCH Market Data Specification. Version 1.4 Updated 3 October 2014

Fuzzing in Microsoft and FuzzGuru framework

Installation and Operation Manual Ascom Report Manager

CONFIGURING TCP/IP ADDRESSING AND SECURITY

MicroLogix 1400 Embedded Web Server

Digital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

IP Filter/Firewall Setup

Solution of Exercise Sheet 5

APC by Schneider Electric Release Notes AP9537 Network Management Card. APC part number: Released: 26 October 2012

EINTE LAB EXERCISES LAB EXERCISE #5 - SIP PROTOCOL

2. IP Networks, IP Hosts and IP Ports

Configuring SSL Termination

Lecture 2. Binary and Hexadecimal Numbers

Troubleshooting for Yamaha router

CNT5106C Project Description

Introduction to IP v6

Hexadecimal Object File Format Specification

13. Publishing Component Information to Embedded Software

Using RADIUS Agent for Transparent User Identification

Cyber Security Workshop Encryption Reference Manual

Simple Network Management Protocol

Outbound Option Installation: SIP Dialer

EXTENDED FILE SYSTEM FOR FMD AND NANO-10 PLC

WSNetServer User Manual. Date: July

Network Trace Analysis

Lab VI Capturing and monitoring the network traffic

Envoy MQ Connector Administrator's Guide

Introduction to Wireshark Network Analysis

Packet Monitor in SonicOS 5.8

Advanced Install & Configuration Guide

Monitoring System Status

Reporting Guide for Novell Sentinel

CYBER ATTACKS EXPLAINED: PACKET CRAFTING

Using TestLogServer for Web Security Troubleshooting

Transcription:

HP Service Virtualization Fixed Length Protocol Virtualization SV Training September 2014

Fixed Length Protocol Virtualization Technology Description Use Cases Supported Message Structures SV Service Description Format Virtual Service Summary Exercise 2

Technology Description TCP/IP layer is used directly Message is introduced by a field describing its length The same message type has usually the same length No delimiters are present Each field is described by offset and length pair Usually used as a legacy protocol or in embedded devices 3

Use Case 4

Use Case 5

Use Cases How to Recognize Fixed Length Message (While Viewing in Hex Editor) Unsupported characters are present in the beginning of the file (underlined) Lots of spaces (hex value 0x20) Lots of zeros (hex value 0x30) No visible data value separation Can read ASCII strings and numbers Free Hex Editor http://frhed.sourceforge.net 00000000 00 00 00 14 53 51 52 54 20 20 30 30 30 30 30 30...SQRT 000000 00000010 30 30 36 34 0064 6

Use Cases How to Recognize Fixed Length Message (From Provided Description) Offset and Length columns Format column Message Length field Alphanumeric and Numeric fields are mostly present Numeric fields are usually left zero padded to defined length Alphanumeric fields are usually right space padded to defined length Message Type field can be present All messages have a message length field on the same offset position Name Offset Length Type Description Value Length 0 4 Binary (network byte order) Message length Type 4 6 String Message type SQRT Number 10 10 Numeric Number 7

Supported Message Structures No occurring structures are supported (arrays of some type, defined field occurrence) Message can be shorter than defined, unspecified fields are set to not present value in SV Supported field data types: Format SV Format Note ASCII, Alphanumeric, String String Just ASCII chars are valid UTF-8, Unicode, Binary Any non-ascii charset Numeric Numeric Numbers in ASCII ( 000010 or -000020 ) Decimal Decimal Numbers in ASCII + decimal separator ( 0005.4 or -005.4 ) Fixed Decimal String Fixed decimal places (i.e. financial applications: 00100.00 ) Integer, Short (big-endian, network byte order) Integer, Short (little-endian, Intel x86) IntBE IntLE Supported byte length is 4 bytes or less. More info: http://en.wikipedia.org/wiki/endianness Binary, other non-specified Binary If some of parent formats is not working, use Binary instead. 8

Evaluation Direction SV Service Description Format (structure) Tab-separated table in *.txt file. Can be prepared in Excel and copy & pasted to *.txt file. Following table format is required (at any order), just bold fields are mandatory: Name Offset Length Type Description Default Value Attributes Length 0 4 IntBE Message Length 1 Type 4 4 String Message Type 2 Request Type Response Type REQ RESP Enumeration of matching message types MsgID 8 6 Numeric Message ID HasError 14 1 Numeric Has Error Flag 0 No Error 0 Error 1 Enumeration of possible values for the parent field Data 15 30 String Message Payload 9

SV Service Description Format (file name) Defined service description is used for request and response calls but if the file name matches one of the following patterns: Request File Name Pattern *_req.txt *_request.txt *_rq.txt *-req.txt *-request.txt *-rq.txt *.req.txt *.request.txt *.rq.txt Response File Name Pattern *_resp.txt *_response.txt *_rs.txt *-resp.txt *-response.txt *-rs.txt *.resp.txt *.response.txt *.rs.txt 10

Virtual Service Summary Multiple responses are supported TCP/IP protocol is only supported Multiple service description files can be used to create a virtual service Simulation from the scratch is not supported, learning is needed Just one virtual service can be deployed on a Fixed-Length TCP Agent Occurring structures are not supported Variable message structures (defined by a precedent field) are not supported Cobol strings are not supported (in a readable way) 11

Summary Introduced simple to use fixed-length protocol in SV No code changes needed for introducing customer-specific fixed-length protocol Easy maintenance of the protocol in customer environment Service description format can be used for further extensions (like Text Based protocol over TCP) 12

Exercise

Fixed Length Protocol Virtualization Exercise Use Case Application Analysis & Packet Dumps Service Description Creation Virtualization Troubleshooting Summary 14

Use Case Demo Application Simple calculator that supports SQRT and PLUS operations Responses are either RESULT or ERROR Demo Application Package Client Application (connecting to localhost:10000) Real Service (listening on localhost:10000) 15

Application Analysis & Packet Dumps Open *.pcap file in Wireshark Example *.pcap file Select the first TCP/IP packet with payload data Check the packet structure (the TCP part is the last part) Find the TCP segment data Check payload of the data Use the protocol recognition steps from the Lesson 5: Fixed Length Protocol Virtualization 16

Service Description Creation SQRT Operation Service Description File for SV Name Offset Length Type Description Default Value Data Attributes Length 0 4 IntBE Message length 1 Type 4 6 String Message type 2 SQRT Number 10 10 Numeric Number Example Excel with Service Descriptions 17

Service Description Creation PLUS Operation Service Description File for SV Name Offset Length Type Description Default Value Data Attributes Length 0 4 IntBE Message length 1 Type 4 6 String Message type 2 PLUS Base 10 2 Numeric Base Binary 2 Octal 8 Decimal 10 Hexadecimal 16 Number1 12 10 String Number 1 Number2 22 10 String Number 2 18

Service Description Creation RESULT Operation Service Description File for SV Name Offset Length Type Description Default Value Data Attributes Length 0 4 IntBE Message length 1 Type 4 6 String Message type 2 RESULT Base 10 2 Numeric Base Binary 2 Octal 8 Decimal 10 Hexadecimal 16 Result 12 10 String Result 19

Service Description Creation ERROR Operation Service Description File for SV Name Offset Length Type Description Default Value Data Attributes Length 0 4 IntBE Message length 1 Type 4 6 String Message type 2 ERROR ErrorCode 10 4 Numeric Error code ErrorMessage 14 1000 String Error message Output error_rs.txt file opened in Notepad++ 20

Virtualization Agent Configuration Virtual Service Port Number Real Service Hostname And Port Number (our example: localhost and 10000 ) 21

Virtualization Creating a Virtual Service & Learning 1. 2. 4. 3. 22 5.

Virtualization After Learning Protocol operations 23

Virtualization Data Model Refinement Message Length Recognition Note the length 24

Virtualization Data Model Refinement Fallback to the Error Message Type Create a new rule and set the message type to error_rs 25

Virtualization Data Model Refinement Default Rule Update Set all fields meaningfully, especially the length field must have the same value as the learned message When you hit the default rule, data model accuracy will be decreases 26

Troubleshooting The following namespaces can be set to TRACE log level to debug the protocol: HP.SV.MessageProcessing.GenericProtocol HP.SV.TcpAgent.FixedAndText HP.SV.MessageProcessing.ProtocolBuilder.GenericProtocolServiceDescriptionBuilder The protocol uses XML message format internally in SV The message logger also displays XML format, so don t be surprised Service description format is tab-separated, so check the format first when you get errors while creating a virtual service Fixed Length TCP Agent can be used just by one virtual service at the same time 27

Summary The same approach applicable also for Text Based protocol over TCP extension in HP SV Extensibility SDK No empty line should be present in a service description file Use Designer/Server logs for debugging Analyze messages in the message logger in Designer 28

Thank you!