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



Similar documents
MODBUS APPLICATION PROTOCOL SPECIFICATION V1.1b CONTENTS

Process Control and Automation using Modbus Protocol

MODBUS APPLICATION PROTOCOL SPECIFICATION V1.1b3 CONTENTS

Modbus Protocol. PDF format version of the MODBUS Protocol. The original was found at:

Modicon Modbus Protocol Reference Guide. PI MBUS 300 Rev. J

CX-Supervisor CX-MODBUS TCP

Library ModbusRTUlib Modbus RTU master communication. TXV rd Issue February 2010 All rights reserved

OPEN MODBUS/TCP SPECIFICATION

Industrial Networks & Databases. Protocols and Networks - Device Bus - - Field Bus -

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

Keywords: Process control systems, Modbus protocol, passive network scanning

MODBUS MESSAGING ON TCP/IP IMPLEMENTATION GUIDE V1.0b CONTENTS

Barry Baker P. Eng. Asset Data Integration Field Device Communication Protocols

Modbus and ION Technology

A Retrofit Network Intrusion Detection System for MODBUS RTU and ASCII Industrial Control Systems

Modbus and ION Technology

MODBUS MASTER/SLAVE Serial and Ethernet Communication Server

INTRODUCTION TO MODBUS TCP/IP

Relion Protection and Control. 611 series Modbus Communication Protocol Manual

PowerLogic ION7550 / ION7650

MBP_MSTR: Modbus Plus Master 12

DeviceMaster UP Modbus Controller to Controller Communication

HP Service Virtualization

EMG Ethernet Modbus Gateway User Manual

User Guide. Babel Buster 2. Model BB BACnet Gateway and Router

Using MODBUS for Process Control and Automation

WIZnet S2E (Serial-to-Ethernet) Device s Configuration Tool Programming Guide

Security Testing in Critical Systems

Using IDENT M System T with Modbus/TCP

IntesisBox KNX Modbus TCP master

The Answer to the 14 Most Frequently Asked Modbus Questions

4511 MODBUS RTU. Configuration Manual. HART transparent driver. No. 9107MCM100(1328)

Industrial Networks & Databases

MODBUS TCP to RTU/ASCII Gateway. User s Manual

Using Logix5000 Controllers as Masters or Slaves on Modbus

ModBus Server - KNX. Gateway for integration of KNX equipment into Modbus (RTU and TCP) control systems.

SCADAPack E DNP3 Technical Reference

APNT#1168 Modbus - Establishing Communications Hints

Modbus TCP Master/Slave Driver for DeltaV Virtual I/O Module

ACCESS 9340 and 9360 Meter Ethernet Communications Card ETHER

WISE-4000 Series. WISE IoT Wireless I/O Modules

Modbus Communications for PanelView Terminals

Technical Support Bulletin Nr.18 Modbus Tips

How-to: DNS Enumeration

Introduction to Analyzer and the ARP protocol

Industrial Networks & Databases. Protocols and Networks - Device Bus - - Field Bus -

ATS Communication Overview

TCP Packet Tracing Part 1

H0/H2/H4 -ECOM100 DHCP & HTML Configuration. H0/H2/H4--ECOM100 DHCP Disabling DHCP and Assigning a Static IP Address Using HTML Configuration

Witte Software. Modbus Poll User manual. June 2015 Modbus Poll version 6.3 Copyright: Witte Software,

Modbus Server SAMSUNG Air Conditioners

EtherNet/IP Scanner Configuration for the Moxa MGate 5105-MB-EIP

Hands On Activities: TCP/IP Network Monitoring and Management

Integrating PATROL with SNMP

The MODBUS Industrial Control Systems Network - 28 Cyber Attacks

IP network tools & troubleshooting. AFCHIX 2010 Nairobi, Kenya October 2010

7.7 Ethernet Communication (AFPX-COM5)

gpio.ipcore: Manual Copyright 2015 taskit GmbH

Introduction: Implementation of the MVI56-MCM module for modbus communications:

Internet Architecture and Philosophy

DDC-100 Direct-to-Host Programming Guide

HC900 Hybrid Controller When you need more than just discrete control

NetBiter webscada Modbus User Manual

IntesisBox Modbus Server SAMSUNG Air Conditioners

Software User Guide UG-461

MODBUS. Table Of Contents

Modbus Protocol User Guide

1.Eastron SDM220Modbus Smart Meter Modbus Protocol Implementation V1.0

SCADA System Security. ECE 478 Network Security Oregon State University March 7, 2005

DNP Master Ethernet Driver Help Kepware Technologies

ATC-300+ Modbus Communications Guide

Network Working Group Request for Comments: 840 April Official Protocols

IP Card Reader Interface User Manual

Host Discovery with nmap

µtasker Document FTP Client

NetFlow Aggregation. Feature Overview. Aggregation Cache Schemes

TSX ETY 110 Module 8

Installation and operation manual

Instructions. ECL Comfort 210 / 310, communication description. Table of Contents

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

ICC. NetLink Version Info INDUSTRIAL CONTROL COMMUNICATIONS, INC.

OpenFlow 1.4. (Changes compared to 1.3 OpenDaylight Perspec>ve) - Abhijit Kumbhare

Application Note. Introduction AN2471/D 3/2003. PC Master Software Communication Protocol Specification

Modbus RTU Communications RX/WX and MRX/MWX

F-SECURE MESSAGING SECURITY GATEWAY

WinTECH Software Industrial Automation Suite of Applications for the Windows O.S.

Modbus Tutorial 7/30/01. Tutorial on TTDM-PLUS and TTSIM System Integration using Modbus

Homework 3 TCP/IP Network Monitoring and Management

White Paper. Technical Capabilities of the DF1 Half-Duplex Protocol

How To Configure An Iec (Runtu) For A Testnet (Rntu)

Private Modbus Serial Bus Functionality via DeviceMaster UP Modbus Router

Technical Information Sheet Page 1 of 8

Comparison of protocols used in remote monitoring: DNP 3.0, IEC & Modbus

Redundancy in Serial-to-Ethernet Communications. White Paper

Lecture 2-ter. 2. A communication example Managing a HTTP v1.0 connection. G.Bianchi, G.Neglia, V.Mancuso

Follow these steps to prepare the module and evaluation board for testing.

Ethernet Port Quick Start Manual

Supervisor 10 Remote Access Users Guide Last Update: 10/27/14

MODFLEX MINI GATEWAY ETHERNET USER S GUIDE

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

Transcription:

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

Agenda Brief introduction to SCADA Systems The MODBUS Protocol MODBUS TCP ModScan Demonstration ModScan Project Information Q&A

Disclaimer The material in this presentation is to be used for authorized security scanning/ auditing If you do something stupid with the information I present here, don t blame me

What is SCADA? Supervisory Control And Data Acquisition is a system that centrally gathers data in real time from local and remote locations in order to control equipment and conditions. Commonly also referred to as Industrial Control Systems (ICS), which is not accurate but close

Where is SCADA? Power Generation/Transmission Water Treatment/Distribution Pipelines Traffic Control Systems Manufacturing Facilities National Infrastructure Communications

SCADA Architecture

What is ModScan? ModScan is a tool to detect open MODBUS/TCP ports and identify device Slave IDs associated with IP addresses ModScan is designed for an administrator or security auditor to be able to accurately reconnoiter a MODBUS/TCP network

The MODBUS Protocol About the Protocol Developed in 1979 by Modicon Free and Open Source The most common protocol found in SCADA and ICS networks Default port 503 Flavors Modbus RTU - Compact Binary Modbus ASCII - Human readable

MODBUS Packet Construction 256 byte max ADU Slave ID Fn Code Data Error Chk 1 byte 1 byte 252 byte max 2 bytes ADU: Application Data Unit PDU PDU: Protocol Data Unit Valid Function codes are 1-127 256 byte maximum packet size Big-Endian encoding Error Check is CRC/LRC

Typical Communication Master Slave Initiate Request SID Fn Data Ec Execute Command Initiate Response SID Fn Data Ec Receive Response Modbus is a Master/Slave Serial Protocol Only Masters can initiate conversation

Error Communication Master Slave Initiate Request SID Fn Data Ec Error Detected Report Error SID EFn Error Code Ec Receive Error Error Function = 0x80 + Function Code Error Codes defined in specification

Function Codes Function Code Description 01 Read Coils 02 Read Discretes 03 Read Holding Registers 04 Read Input Registers 05 Write Coil 06 Write Register 07 Read Exception Status 08 Diagnostics 0B Get Comm Event Counter 0C Get Comm Event Log 0F Write Multiple Coils 10 Write Multiple Registers 11 Report Slave ID 14 Read File Record 15 Write File Record 16 Mask Write Register 17 Read/Write Multiple Registers 18 Read FIFO Que

Diagnostic Codes Function Code Description 00 Return Query Data 01 Restart Communication 02 Return Diagnostic Register 03 Change ASCII Input Delimiter 04 Force Listen Only Mode 05-09 Reserved 0A Clear Counters and Diagnostic Reg. 0B Return Bus Message Count 0C Return Bus Communication Error Count 0D Return Bus Exception Error Count 0E Return Slave Message Count 0F Return Slave No Response Count 10 Return Slave NAK Count 11 Return Slave Busy Count 12 Return Bus Character Overrun Count 13 Reserved 14 Clear Overrun Counter and Flag 16+ Reserved

Modbus Notes Addressing Valid Slave IDs 1-247 Slave ID must be unique per bus Masters do not have to have an address Slaves will error when improperly addressed Communication One request on the line at a time Masters must wait for responses

ModBus/TCP ModBus protocol wrapped in TCP Goodness Checksum dropped Introduces Gateway device to ModBus Port 502 is reserved for Modbus/TCP No additional inherent security measures

ModBus/TCP Architecture

ModBus/TCP Packet MBAP PDU Tran ID Proto ID Length SID Fn Data 2 2 2 1 1 252 Bytes MBAP: MODBUS Application Protocol Header Protocol ID is always 0x0000 Big-Endian encoding PDU remains the same from the MODBUS spec

Example Request Diag Code Data Tran ID Proto ID Len SID FN Request sent by Master Request is to Slave 01 Fn 8 Diagnostics Diagnostic code 00 for Return Query Data

Example Response Diag Code Data Tran ID Proto ID Len SID FN Response sent by slave Identical to Request Request is to Slave 01 Fn 8 Diagnostics Diagnostic code 00 for Return Query Data

Error Request Bad Diag Code Tran ID Proto ID Len SID FN Request is to Slave 01 Fn 8 Diagnostics Diagnostic code FF sent

Error Response Error Code (data) Tran ID Proto ID Len SID FN Function code is 0x88 or 0x08 + 0x80 Error 0x03 is Illegal data value Specific Error codes are returned in data field

Errors are the Key When an improper SID is sent The slave will not respond The slave will respond with FN+0x80 When a proper SID is sent The slave will respond with a valid response This forms the basis for mapping

ModScan Modscan Scans the IP range provided for open 503 ports When an open port is found it finds the SID via brute force By default it stops after first discovered SID Output in IP:Port\tSID format

Options -p PORT (502) -t TIMEOUT socket timeout (100 mills) -a --aggressive Aggressive Mode -f FUNCTION MODBUS Function Code (17) --data Data for use with -f -v, -d Verbose, Debug

ModScan Demonstration Scanning our sample network A look at a pcap Demo of additional Options

ModScan Project http://modscan.googlecode.com Uses Security Network Enumeration IDS/Network Monitoring Test Asset Management Bulk Commands

Known Issues Really, Really Noisy Brute forcing all ports is inefficient Does not interpret Error Codes Can generate false negatives Does not calculate Length TCP Checksum not properly calculated

Planned Enhancements Interpret Error Codes Implement with SCAPY Additional Protocol Support Device Fingerprinting Anything cool someone suggests...

Questions?

References http://en.wikipedia.org/wiki/scada http://www.modbus.org/specs.php http://www.wingpath.co.uk

Contact Information Mark Bristow mark.bristow@gmail.com modscan.googlecode.com