ModbusFW Deep Packet Inspection for Industrial Ethernet



Similar documents
Vulnerability Testing of Industrial Network Devices

CSE543 - Computer and Network Security Module: Firewalls

Network Security. Tampere Seminar 23rd October Overview Switch Security Firewalls Conclusion

CSC574 - Computer and Network Security Module: Firewalls

Module: Firewalls. Professor Patrick McDaniel Spring CMPSC443 - Introduction to Computer and Network Security

CS Computer and Network Security: Firewalls

Secure Networks for Process Control

CIS 433/533 - Computer and Network Security Firewalls

CIT 480: Securing Computer Systems. Firewalls

CS Computer and Network Security: Firewalls

Firewalls. Chien-Chung Shen

Chapter 7. Firewalls

Protecting and controlling Virtual LANs by Linux router-firewall

How To Understand A Firewall

ΕΠΛ 674: Εργαστήριο 5 Firewalls

Track 2 Workshop PacNOG 7 American Samoa. Firewalling and NAT

Networking Basics and Network Security

Introduction to Firewalls

Security Technology: Firewalls and VPNs

Firewalls. Chapter 3

ΕΠΛ 475: Εργαστήριο 9 Firewalls Τοίχοι πυρασφάλειας. University of Cyprus Department of Computer Science

Industrial Network Security for SCADA, Automation, Process Control and PLC Systems. Contents. 1 An Introduction to Industrial Network Security 1

Firewalls and VPNs. Principles of Information Security, 5th Edition 1

Linux firewall. Need of firewall Single connection between network Allows restricted traffic between networks Denies un authorized users

How To Set Up An Ip Firewall On Linux With Iptables (For Ubuntu) And Iptable (For Windows)

Firewalls. Pehr Söderman KTH-CSC

Firewall Introduction Several Types of Firewall. Cisco PIX Firewall

How to Choose the Right Industrial Firewall: The Top 7 Considerations. Li Peng Product Manager

1. Cyber Security. White Paper Data Communication in Substation Automation System (SAS) Cyber security in substation communication network

Overview. Firewall Security. Perimeter Security Devices. Routers

Main functions of Linux Netfilter

Network Security. Chapter 3. Cornelius Diekmann. Version: October 21, Lehrstuhl für Netzarchitekturen und Netzdienste Institut für Informatik

IMPLEMENTATION OF INTELLIGENT FIREWALL TO CHECK INTERNET HACKERS THREAT

Security Testing in Critical Systems

Linux Firewall. Linux workshop #2.

PROTECTING INFORMATION SYSTEMS WITH FIREWALLS: REVISED GUIDELINES ON FIREWALL TECHNOLOGIES AND POLICIES

Intro to Linux Kernel Firewall

Firewalls. Test your Firewall knowledge. Test your Firewall knowledge (cont) (March 4, 2015)

Linux Firewall Wizardry. By Nemus

ACADEMIA LOCAL CISCO UCV-MARACAY CONTENIDO DE CURSO CURRICULUM CCNA. SEGURIDAD SEGURIDAD EN REDES. NIVEL I. VERSION 2.0

CSE 4482 Computer Security Management: Assessment and Forensics. Protection Mechanisms: Firewalls

Firewalls (IPTABLES)

CMPT 471 Networking II

IPv6 Firewalls. ITU/APNIC/MICT IPv6 Security Workshop 23 rd 27 th May 2016 Bangkok. Last updated 17 th May 2016

How To Protect Your Firewall From Attack From A Malicious Computer Or Network Device

Definition of firewall

Firewalls. Ola Flygt Växjö University, Sweden Firewall Design Principles

CIT 480: Securing Computer Systems. Firewalls

CSCE 465 Computer & Network Security

Optimisacion del ancho de banda (Introduccion al Firewall de Linux)

TECHNICAL NOTES. Security Firewall IP Tables

Proxy Server, Network Address Translator, Firewall. Proxy Server

Firewalls, NAT and Intrusion Detection and Prevention Systems (IDS)

CompTIA Network+ (Exam N10-005)

Networking for Caribbean Development

Firewalls. Ahmad Almulhem March 10, 2012

- Introduction to PIX/ASA Firewalls -

Network Security Management

Virtual private network. Network security protocols VPN VPN. Instead of a dedicated data link Packets securely sent over a shared network Internet VPN

CS 356 Lecture 19 and 20 Firewalls and Intrusion Prevention. Spring 2013

Overview of Network Security The need for network security Desirable security properties Common vulnerabilities Security policy designs

Netfilter / IPtables

Network Security Infrastructure Testing

Computer Security CS 426 Lecture 36. CS426 Fall 2010/Lecture 36 1

Firewalls. Ingress Filtering. Ingress Filtering. Network Security. Firewalls. Access lists Ingress filtering. Egress filtering NAT

Gigabit SSL VPN Security Router

Lumeta IPsonar. Active Network Discovery, Mapping and Leak Detection for Large Distributed, Highly Complex & Sensitive Enterprise Networks

Network Security Topologies. Chapter 11

We will give some overview of firewalls. Figure 1 explains the position of a firewall. Figure 1: A Firewall

Firewall. IPTables and its use in a realistic scenario. José Bateira ei10133 Pedro Cunha ei05064 Pedro Grilo ei09137 FEUP MIEIC SSIN

INTERNET SECURITY: THE ROLE OF FIREWALL SYSTEM

Chapter 15. Firewalls, IDS and IPS

Network Security. by David G. Messerschmitt. Secure and Insecure Authentication. Security Flaws in Public Servers. Firewalls and Packet Filtering

Firewalls. CEN 448 Security and Internet Protocols Chapter 20 Firewalls

Network Access Security. Lesson 10

CYBER ATTACKS EXPLAINED: PACKET CRAFTING

REPORT ON AUDIT OF LOCAL AREA NETWORK OF C-STAR LAB

IT Security and OT Security. Understanding the Challenges

Chapter 9 Firewalls and Intrusion Prevention Systems

Recommended IP Telephony Architecture

Who is Watching You? Video Conferencing Security

Chapter 5. Figure 5-1: Border Firewall. Firewalls. Figure 5-1: Border Firewall. Figure 5-1: Border Firewall. Figure 5-1: Border Firewall

Module 8. Network Security. Version 2 CSE IIT, Kharagpur

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

8. Firewall Design & Implementation

Internet Firewall CSIS Internet Firewall. Spring 2012 CSIS net13 1. Firewalls. Stateless Packet Filtering

Network Security and Firewall 1

Considerations In Developing Firewall Selection Criteria. Adeptech Systems, Inc.

Gigabit Multi-Homing VPN Security Router

Securing EtherNet/IP Using DPI Firewall Technology

Stateful Firewalls. Hank and Foo

A host-based firewall can be used in addition to a network-based firewall to provide multiple layers of protection.

Linux: 20 Iptables Examples For New SysAdmins

NETWORK SECURITY (W/LAB) Course Syllabus

Network System Design Lesson Objectives

Transcription:

ModbusFW Deep Packet Inspection for Industrial Ethernet Matthew Franz (mfranz@cisco.com) Venkat Pothamsetty (vpothams@cisco.com) Critical Infrastructure Assurance Group (CIAG) Cisco Systems, Inc. http://www.cisco.com/go/ciag/ 2004 Cisco Systems, Inc. All rights reserved. 1

Agenda CIAG Research Control Systems Security Initiatives Industrial Network Security 101 Review of Network Filtering Technology Extending Linux Netfilter/Iptables to support Modbus/TCP DEMO: Protecting our SCADA System from a Dangerous Canadian Hacker Next Steps and Follow-On Research Conclusions, Feedback, and Questions 2

CIAG Research Overview Research Team Charter Conduct and sponsor research to improve the security of network and computing technology used by critical infrastructures Core Competencies Secure Network and Protocol Design Vulnerability Testing & Analysis Security Toolkit Development Product Enhancement & Hardening Key Deliverables External Presentation/Publications Best Practices and Standards Open Source Tools and Standards 3

CIAG Research Activity (Overall) BGP Security Attack Tree, Secure Routing Registry, sobgp IPv6 Analysis of Threats, Vulnerabilities, and Best Practices (especially compared to IPv4) Security of Embedded Network Devices NIAC Internet Hardening and Vulnerability Scoring Working Groups Industrial Network Security and Control Systems 4

Control Systems Security Initiatives Strategic commitment to understand the problem space and develop solutions whether or not there is revenue potential Relevant research projects AGA 12-1 Implementation SCADA Vulnerability Testing Factory Automation Security Modbus/TCP Firewall Prototype Virtual SCADA HoneyNet Industrial Stack Testing Building Automation Security DNP3 Security Testing (sponsored research at BCIT) Standards participation AGA 12-1, SP-99, PCSRF 5

ModbusFW: Initial Objectives* Develop countermeasures to problems uncovered in NISCC-sponsored vulnerability research done by BCIT & CIAG in 2003 Determine feasibility of adding application-layer support for Industrial Ethernet protocols to a general purpose (read IT ) packet filter Identify level of interest and seed commercialization *Although we tackled a very narrow problem, there are wider lessons to be learned here 6

Industrial Network Security 101 2004 Cisco Systems, Inc. All rights reserved. 7

Known vulnerabilities in control system networks Design Insecure comm links Insecure devices & protocols Less than weak authentication in devices and protocols Insecure remote access (i.e. dialin modems, partner, integrator connections) Undocumented commands/backdoors Ill-defined or unrealistic security requirements Implementation TCP/IP stack issues Protocol flaws OS/App flaws Windows HMI Flaws WEP/802.11 Flaws DoS to Network infrastructure Device Insecure coding practices and inadequate testing Configuration Weak/default passwords 802.11 Defaults (no WEP) Inadequate filtering on router/firewall OS defaults and failure to apply patches & upgrades Default insecure features and difficult or non-scalable secure features 8

Device Vulnerabilities Most PLCs (Communication Modules) have no ability to filter based on source IP address let alone based on application layer message types Few devices have the ability to do low-level packet filtering (to mitigate network transport layer attacks) TCP/IP Stack Issues Resource Exhaustion Poor Initial Sequence Number Selection Malformed Message Poor TCP ISN Selection Use of IT Protocols for Industrial Applications See ISA 03 Presentation for more details 9

Protocol Vulnerabilities Most Industrial Ethernet protocols simply encapsulate serial/fieldbus protocol over TCP/UDP CIP EtherNet/IP MODBUS Modbus/TCP Lack of Authentication, Authorization, and Encryption in Protocol Design and Specification Implementation flaws in processing valid/invalid formatted messages 10

Review of Filtering Technology Intelligent switches/bridges Filter on L2 (MAC) source address Router Access Control Lists Filter source/destination based on L3 (IP Address/Protocol) and L4 (TCP/UDP Port) Stateful Firewalls Filter based on TCP/ICMP/UDP state and limited support for some applications Application Proxies Complete application and protocol support, typically requires reconfiguration of client Deep Packet Inspection and Network IPS High speed (possibly inline/transparent) filtering at all application and protocol layers 11

Assessment of Existing Technology Assuming there is a properly configured border firewall between Plant/Enterprise networks, we need additional layers of protection Just filtering on TCP port 502 (in the case of Modbus/TCP) may not provide granular enough access control Differing security requirements within the Plant network may require additional layers of security and additional security devices Operational control issues between IT and Control Systems who owns the border security device and do they have the knowledge to adequately secure it? 12

Plant-Enterprise Policy Enforcement? IT WAN Possible Focal Points for policy enforcement Si Si Plant IT, Plant Engineering, Plant Data Center Internet Si Si Remote Access WAN/PSTN VLAN 101 Direct Remote Access VLAN 102 VLAN 103 Cell Zone Cell VLAN 104 VLAN 105 PSTN 13

ModbusFW: Design & Implementation 2004 Cisco Systems, Inc. All rights reserved. 14

Firewalls & Linux Why Linux? Most popular Open Source OS Linux Netfilter is well-documented with a rich library of extensions Increasing use of Linux in Embedded Systems and some interest in Industrial Computing Why not an application-layer proxy? Concern about performance packet filtering is done in the kernel and is fast! Need for transparency where is the configure proxy option in your HMI? Implementation Overview Netfilter provides kernel hooks to make policy decisions at critical points Iptables command-line tool for setting policy We had to modify both to implement ModbusFW 15

Simplified Linux Netfilter Packet Flow Incoming interface[s]? App Process Outgoing interface[s] Netfilter C H A I N S INPUT FORWARD OUTPUT PREROUTING POSTROUTING POLICY: ACCEPT, DROP, REJECT, MASQUERADE 16

Anatomy of A Modbus/TCP Message 17

Sample ModbusFW Rules # iptables -A INPUT -p tcp -m modbus --funccode 8 allowtcp 1 -j DROP Drops whenever the function code of the received packet is 8 (Diagnostics) # iptables -A INPUT -p tcp -m modbus --funccode! 16 allowtcp 1 -j DROP Drops whenever the function code of the received packet is NOT 16 (Write Multiple Registers) # iptables -A INPUT -p tcp -m modbus --funccode 16 allowtcp 1 --unitid!3 --refnum 5433 -j DROP The packet will the dropped when either function code is 16, OR unitid is not 3 OR reference number is 5433 18

Analyzing Modbus/TCP Traffic to Derive Rules 14.455884 192.168.59.101 -> 192.168.60.171 Modbus/TCP query [1 pkt(s)]: trans: 42; unit: 0, func: 40: Program (ConCept). 14.462604 192.168.60.171 -> 192.168.59.101 Modbus/TCP response [ 1 pkt(s)]: trans: 42; unit: 0, func: 40: Program (ConCept). 14.580781 192.168.59.101 -> 192.168.60.171 TCP 2366 > 502 [ACK] Seq=617 Ack=838 Win=64019 Len=0 15.643352 192.168.59.101 -> 192.168.60.171 Modbus/TCP query [ 1 pkt(s)]: trans: 43; unit: 0, func: 40: Program (ConCept). 15.652584 192.168.60.171 -> 192.168.59.101 Modbus/TCP response [ 1 pkt(s)]: trans: 43; unit: 0, func: 40: Program (ConCept). 15.783872 192.168.59.101 -> 192.168.60.171 TCP 2366 > 502 [ACK] Seq=629 Ack=850 Win=64007 Len=0 16.315610 192.168.59.101 -> 192.168.60.171 Modbus/TCP query [ 1 pkt(s)]: trans: 44; unit: 0, func: 126: Program (584/984). 16.322522 192.168.60.171 -> 192.168.59.101 Modbus/TCP response [ 1 pkt(s)]: trans: 44; unit: 0, func: 126: Program (584/984). 19

Sample Filtering Policies (based on FC) Modicon Applications Momentum E1 Web Interface Concept Software 1 Read Coil 126 Vendor Extension 8 Diagnostics 40 Vendor Proprietary (Program) 126 Vendor Extension 3 Read Multiple Registers Findings Detailed protocol analysis with a sniffer (and extensive testing) is required to develop functional firewall policy based on applications Given extensive used of FC 126 by Modicon applications, additional filtering may be necessary to block Malicious (write/alter) messages Other (IT protocols, such as FTP or Telnet) may need to be filtered depending on the device Documentation of device/application implementation is essential! 20

Simple Permissive Ruleset # Allow all ICMP and SNMP for network monitoring iptables -A FORWARD -p icmp -j ACCEPT iptables A FORWARD p udp -dport 161 j ACCEPT # Allow connections to embedded webserver iptables -A FORWARD -p tcp --sport 80 -j ACCEPT iptables -A FORWARD -p tcp --dport 80 -j ACCEPT # Open up function codes for Concept software iptables -A FORWARD -p tcp -m modbus --funccode 1 --allowtcp 1 -j ACCEPT iptables -A FORWARD -p tcp -m modbus --funccode 3 --allowtcp 1 -j ACCEPT iptables -A FORWARD -p tcp -m modbus --funccode 8 --allowtcp 1 -j ACCEPT iptables -A FORWARD -p tcp -m modbus --funccode 40 --allowtcp 1 -j ACCEPT iptables -A FORWARD -p tcp -m modbus --funccode 126 --allowtcp 1 -j ACCEPT iptables -A FORWARD -p tcp -j REJECT --reject-with tcp-reset #Default deny iptables -P FORWARD DROP 21

ModbusFW: Next Steps Testing, Testing, Testing! Interoperability with most common devices & applications Test with NAT and Port Forwarding Real Performance Testing Penetration Testing and Source Code Audit Workarounds for the allowtcp hack possible userspace handoff to spoof exception responses Modbus/TCP Function Code Library Database of function codes used by devices and applications Deeper packet inspection What is practical for Read/Write function codes? Modicon FC 126 (probably requires reverse engineering) Linux Bridging Firewall for a transparent L2-L7 capability 22

Demo: Protecting our SCADA System from a Dangerous Canadian Hacker 2004 Cisco Systems, Inc. All rights reserved. 23

Next Steps, Follow-on Research, and Conclusions 2004 Cisco Systems, Inc. All rights reserved. 24

ModbusFW: Potential Follow-on work Intuitive Interface for non-it users Automated/Automatic Ruleset Configuration Support for EtherNet/IP and other protocols Modbus/TCP was straightforward Multicast, UDP/UDP, Connection-Oriented Protocols Support for Linux Bridging Firewall Userspace extensions to provide more graceful session termination Is there really any value in bump in the wire serial protocol filters using function codes? (probably not) Implement technology in commercial firewall, routers, and switches 25

Conclusions Technology knows no organizational boundaries IT Security Products can be altered to secure control system applications Security technologies and practices lag threats and vulnerabilities it is now 1996? Vulnerabilities are still known by a small but growing community for now?! Small target population Industrial Ethernet (and wireless) have not reached critical mass Threat picture is unclear lack of automated tools (although this could change quickly) Simple type-code filtering is better that the status quo but is probably a partial (interim?) solution to more robust security enhancement necessary for industrial devices and protocols 26

Conclusions (cont.) Security enhancements for automation protocols are 3-5 years away from widespread deployment, but legacy devices will remain a problem after secure protocols become a reality Hard problems yet to be solved: Operational constraints of deploying security deep within the automation cell especially management and monitoring Operation control and interaction between multiple security technologies (authentication servers, VPNs, border routers, and firewalls) Integration of Control System Security Software and Network Security Countermeasures? What device is best suited for application protocol filtering: firewall, router, intelligent switch? Where should it be deployed? 27

For more information Copy of this presentation http://www.io.com/~mdfranz/papers/ http://www.scadasec.net/ Sourceforge site http://modbusfw.sourceforge.net See Trinux ModbusFW a small bootable CD-ROM Linux Distribution MODBUS-IDA Website http://www.modbus-ida.org Linux Netfilter http://www.netfilter.org ISA SP-99 TR1 28

29