curator,+CISSE v01 I01 A04
curator,+CISSE v01 I01 A04
Packet Inspection
Abstract - The nation's critical infrastructures, such as avenues that can be pursued as extensions to this seminal
those found in industrial control systems (ICS), are work.
increasingly at risk and vulnerable to internal and
external threats. One of the traditional ways of 2 Industrial Control System Protocols
controlling external threats is through a network device Industrial control system protocols range from wired to
called a firewall. However, given that the payload for wireless. Wired protocols include Ethernet/IP, Modbus,
controlling the ICS is usually encapsulated in other Modbus/TCP, Distributed Network Protocol version3
protocols, the tendency is for the firewall to allow (DNP3), PROFIBUS, CANOpen, and DeviceNet. The
packets that appear to be innocuous. These seemingly wireless variety include WirelessHART, 802.15
harmless packets can be carriers for sinister attacks that (Bluetooth), 802.16 (Broadband) and Zigbee. Some of
are buried deep into the payload. The purpose of this these protocols are briefly described in the following
paper is to present the different ICS protocol header subsections.
signatures for the purpose of devising deep packet
inspection strategies that can be implemented in network
firewalls. 2.1 DNP3
The Distributed Network Protocol Version 3 (DNP 3.0)
Keywords: Industrial Control Systems (ICS), Network is a protocol standard to define communications between
Protocols, Deep Packet Inspection, Firewall, Intrusion Remote Terminal Units (RTU), master stations, and
Prevention, SCADA. Intelligent Electronic Devices (IEDs). It was originally a
proprietary model developed by Harris Controls Division
and designed for SCADA systems. DNP 3.0 is an open
1 Introduction protocol standard and is an accepted standard by the
The nation's critical infrastructures, such as those found electric, oil & gas, waste/water, and security industries
in industrial control systems (ICS), are increasingly at [Clarke, Reynders & Wright, 2004].
risk and vulnerable to internal and external threats. One
of the traditional ways of controlling external threats is DNP 3.0 is a four-layer subset of the OSI 7 layer model.
through a network device called a firewall. However, The layers are the application, data link, physical, and
given that the payload for controlling the ICS is usually pseudo-transport layers. The pseudo-transport layer
encapsulated in other protocols, the tendency is for the includes routing, flow control of data packets, and
firewall to allow packets that appear to be innocuous. transport functions such as error-correction and
These seemingly harmless packets can be carriers for disassembly and assembly of packets. The transport layer
sinister attacks that are buried deep into the payload. takes an APDU (application protocol data unit) from the
Thus, defense-in-depth techniques, such as Deep Packet application layer and breaks it down into smaller units of
Inspection (DPI), are needed to counter these potentially TPDU (transport protocol data unit), which consists of a
damaging activities. Our goal is to provide the reader one byte header followed by a maximum of 249 bytes of
with a deeper understanding of ICS protocol packets data. The header contains a bit that identifies the start of
which could be useful in packet analysis and in the the sequence of TPDU frames and another bit that
development of tools for DPI. identifies the end. Following these two bits is a six-bit
sequence counter. The Link Protocol Data Unit (LPDU),
The rest of the paper is organized into four parts. First, also known “DNP3 Frame” has a maximum limit of 292
we present a review of industrial control system bytes [Clarke, Reynders, & Wright, 2004]. The DNP3
protocols and detailed depiction of their network frames. link layer frame is shown in Figure 1.
Second, we cover various devices and systems for
network packet filtering. In the third section, we
illustrate packet dissection by analyzing a handful of
industrial network protocol packets that were captured by
an open source network packet analysis tool. Finally, we
conclude our paper by presenting possible research
determines how the data will packed and decoded
HEADER DATA SECTION
[Modicon, 2000].
2.6 ControlNet The encapsulation header and data fields are shown in
ControlNet is a token-passing bus control network Figure 10. The two-octet command (Cmd) field
protocol that is based on the IEEE 802.4 standard. The represents various types of commands such as broadcast,
nodes in the token bus network are configured into a ring session opening and closing, and receiving and sending
topology, and in particular, in ControlNet, each node data for connected and unconnected messaging.
knows the address of the preceding and succeeding
Encapsulation Header Encapsulation Data # iptables –A INPUT –p tcp –m modbus –funccode 8 –
Session Sender Data Common allowtcp 1 –j DROP
Cmd Len Status Options
Handle Context Packet Format # iptables –A input –p tcp –m modbus –funccode !16 –
Figure 10. Encapsulation Packet Format allowtcp 1 –j DROP
2.8 EtherCAT The first rule drops a Modbus packet with a diagnostic
function code; the second rule drops a Modbus packet
EtherCAT stands for Ethernet for Control Automation
whose function code is NOT a write multiple registers
Technology. It is a control system protocol that is mainly
(16). The rules are simple examples of filtering Modbus
used to satisfy very high performance requirements in
packets but are not very useful in practice. Obviously
the manufacturing environment. For a typical 1000
there is a great need for developing filters that are
distributed points the update time is approximately 30
creatively constructed using DPI and intelligent
microseconds [Digital Bonds, 2013]. The format of an
mechanisms. These filters can then be applied on fields
EtherCAT UDP frame is shown in Figure 11. The
and values in control systems. These fields might include
EtherCAT telegram consist of one or more datagrams,
register read and write commands, controlled objects,
each serving a particular memory area of the logical
and service requests [Byres, 2012].
process images of up to 4 GB in size. The EtherCAT
frame header consists of a length field, a reserve field,
and a type field which indicates the nature of the data 3.2 Deep Packet Inspection(DPI)
carried by the EtherCAT telegram [EtherCAT, 2013]. Deep Packet Inspection is the process of allowing packet
inspecting devices, such as firewalls and Intrusion
EtherCAT Prevention Systems (IPS), to perform an in-depth
Ethernet IP UDP EtherCAT Ethernet
Header Header Header
Frame
Telegram Trailer analysis of packet contents. This in-depth analysis is
Header
much broader than common technologies in that it
Figure 11. EtherCAT UDP Frame combines protocol anomaly detection and signature
scanning to realize its potential [Ramos, 2009]. The
3 Network Filters interested reader is referred to Antonello, et al. (2012) for
a comprehensive literature review on various tools and
Network filters found in devices such as routers,
techniques for the development of DPI systems.
gateways, bridges, firewalls, and intrusion prevention
systems are the first line of defense against malicious
packets. In this section, we examine the different 4 ICS Protocol Packet Dissection
techniques that are used to realize their filtering In this section, we present snapshots of captured
functionalities. We also introduce the concept of deep industrial protocol packets that are encapsulated by
packet inspection to usher our on-going work on ICS Ethernet. We believe that, due to the ubiquity of the
protocol packet dissection. adaptation of industrial protocol on this networking
technology, network attacks on industrial control
equipment will most likely come with this encapsulation.
3.1 Filtering Techniques A cursory analysis of each packet is presented with
Deep packet inspection is small part of the filtering the aim of stimulating the interest of the reader in
techniques that are adopted by security providers in their exploring the other ICS protocol packets that are not
commercial products. A non-exhaustive list, which is shown in this paper. Further, a packet dissection using
shown below, is presented in [Franz & Pothamsetty, freely accessible packet capture and analysis software
2004]. such as Wireshark [Wireshark, 2013] or Capsa Network
• Layer 2 filtering using intelligent Analyzer [Colasoft, 2013] provides tremendous boost
switches/bridges; towards securing industrial networks. Foremost among
• Access Control Lists on Layer 3 and 4 using the derived benefits are 1) the facilitation of deep packet
routers; inspection; 2) the enhancement of data collection for
• Stateful Firewall filtering; predictive analytics; and 3) the provision of a deeper
• Application Proxy filtering; and understanding of the protocol architecture and behavior.
• Deploying DPI and Intrusion Preventing
Systems.
In describing an implementation of a Modbus firewall 4.1 Modbus/TCP Packet
for DPI, Franz & Pothamsetty showed some simple A sample captured Modbus/TCP packet dissection is
firewall rules [Franz & Pothamsetty, 2004]: shown in Figure 12. Note how perfect the Modbus and
Modbus/TCP segments map directly with the APDU
fields shown in Figure 4. With this information at hand,
the DPI designer can now judiciously put forth more
sensible IPS or firewall rules that are tuned to the secure 4.3 EtherCAT Packet
operations of the ICS. As an additional note, after a A sample captured EtherCAT packet dissection is shown
quick perusal on how the protocol is assembled, a trained in Figure 14. Again, it can easily be seen the mapping of
security analyst can easily recognize a security the dissected fields to those shown in Figure 11. The
vulnerability: the lack of an authentication mechanism. EtherCAT frame header is carrying “command” types of
data that are defined in each of the datagrams
(telegrams).