ICE Tea Presentation 5 th October 2012 PLCs Security Author: Filippo Tilaro.

Slides:



Advertisements
Similar presentations
Operating-System Structures
Advertisements

The Intelligent Fuzzing in TTCN-3 Xu Luo, Wu Ji, Liu Chao Software Engineering Institute Beihang University
Chapter 19: Network Management Business Data Communications, 4e.
1 ITC242 – Introduction to Data Communications Week 12 Topic 18 Chapter 19 Network Management.
Introduction to Web Database Processing
CASE Tools CIS 376 Bruce R. Maxim UM-Dearborn. Prerequisites to Software Tool Use Collection of useful tools that help in every step of building a product.
Computer Security and Penetration Testing
SIMULATING ERRORS IN WEB SERVICES International Journal of Simulation: Systems, Sciences and Technology 2004 Nik Looker, Malcolm Munro and Jie Xu.
Siemens Openlab Major Review February 2012 PLCs Security Author: Filippo Tilaro Supervised by: Brice Copy.
Lecture slides prepared for “Business Data Communications”, 7/e, by William Stallings and Tom Case, Chapter 8 “TCP/IP”.
TEST CASE DESIGN Prepared by: Fatih Kızkun. OUTLINE Introduction –Importance of Test –Essential Test Case Development A Variety of Test Methods –Risk.
What is in Presentation What is IPsec Why is IPsec Important IPsec Protocols IPsec Architecture How to Implement IPsec in linux.
Agenda Adaptation of existing open-source control systems from compact accelerators to large scale facilities.
Wireshark Presented By: Hiral Chhaya, Anvita Priyam.
W3af LUCA ALEXANDRA ADELA – MISS 1. w3af  Web Application Attack and Audit Framework  Secures web applications by finding and exploiting web application.
.NET, and Service Gateways Group members: Andre Tran, Priyanka Gangishetty, Irena Mao, Wileen Chiu.
Securing Legacy Software SoBeNet User group meeting 25/06/2004.
Hands-On Microsoft Windows Server 2008 Chapter 1 Introduction to Windows Server 2008.
CS252: Systems Programming Ninghui Li Final Exam Review.
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Penetration Testing Security Analysis and Advanced Tools: Snort.
OASIS V2+ Next Generation Open Access Server CSD 2006 / Team 12.
Control Over WirelessHART Network S. Han, X. Zhu, Al Mok University of Texas at Austin M. Nixon, T. Blevins, D. Chen Emerson Process Management.
A Framework for Automated Web Application Security Evaluation
1 GAIA VoIP traffic generator and analyzer Presentation by Amrut Bang Ashish Deshpande Vijay Gabale Santosh Patil Sponsored by GS Lab Pvt. Ltd Pune Institute.
Bacon A Penetration and Auditing Framework Hernan Gips
W. Sliwinski – eLTC – 7March08 1 LSA & Safety – Integration of RBAC and MCS in the LHC control system.
1. 2 Purpose of This Presentation ◆ To explain how spacecraft can be virtualized by using a standard modeling method; ◆ To introduce the basic concept.
Automatic Generation Tools UNICOS Application Builder Overview 11/02/2014 Ivan Prieto Barreiro - EN-ICE1.
Protocols and the TCP/IP Suite
ITER – Interlocks Luis Fernandez December 2014 Central Interlock System CIS v0.
Module 7: Fundamentals of Administering Windows Server 2008.
OV Copyright © 2013 Logical Operations, Inc. All rights reserved. Network Security  Network Perimeter Security  Intrusion Detection and Prevention.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
1 Version 3.0 Module 11 TCP Application and Transport.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Operating.
OV Copyright © 2011 Element K Content LLC. All rights reserved. Network Security  Network Perimeter Security  Intrusion Detection and Prevention.
BLU-ICE and the Distributed Control System Constraints for Software Development Strategies Timothy M. McPhillips Stanford Synchrotron Radiation Laboratory.
Siemens Openlab Major Review September  Organization  Data Analytics  PLCs Security  WinCC Open Architecture  Database Archiver  Deployment.
CSCI 530 Lab Intrusion Detection Systems IDS. A collection of techniques and methodologies used to monitor suspicious activities both at the network and.
CHAPTER TEN AUTHORING.
© Siemens AG All rights reserved. openlab III Board of Sponsors 3-4 May 2011 at CERN Joint Report Siemens - CERN.
Topics of presentation
A powerful network monitoring system
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Copyright © cs-tutorial.com. Overview Introduction Architecture Implementation Evaluation.
Session 1 Introduction  What is RADE  Technology  Palette  Tools  Template  Combined Example  How to get RADE  Questions? RADE Applications EN-ICE-MTA.
Lesson 19-E-Commerce Security Needs. Overview Understand e-commerce services. Understand the importance of availability. Implement client-side security.
Wireless and Mobile Security
August 2003 At A Glance The IRC is a platform independent, extensible, and adaptive framework that provides robust, interactive, and distributed control.
Thomas L. Gilchrist Testing Basics Set 3: Testing Strategies By Tom Gilchrist Jan 2009.
ECHO A System Monitoring and Management Tool Yitao Duan and Dawey Huang.
Industrial Control Engineering Session 1 Introduction  What is RADE  Technology  Palette  Tools  Template  Combined Example  How to get RADE 
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Open-source fuzzing testing for critical equipment robustness Brice Copy Engineering Department CERN, Switzerland (CS)2/HEP Workshop 18 th October 2015,
Firewalls. Overview of Firewalls As the name implies, a firewall acts to provide secured access between two networks A firewall may be implemented as.
AN AUTOMATED TESTING PROCEDURE TO EVALUATE INDUSTRIAL DEVICES COMMUNICATION ROBUSTNESS Author: Filippo Tilaro Supervised by: Brice Copy.
Fermilab Scientific Computing Division Fermi National Accelerator Laboratory, Batavia, Illinois, USA. Off-the-Shelf Hardware and Software DAQ Performance.
11 DEPLOYING AN UPDATE MANAGEMENT INFRASTRUCTURE Chapter 6.
IST 201 Chapter 11 Lecture 2. Ports Used by TCP & UDP Keep track of different types of transmissions crossing the network simultaneously. Combination.
Chapter Goals Describe the application development process and the role of methodologies, models, and tools Compare and contrast programming language generations.
Section Meeting Presentation 25th June 2012
Network Monitoring System
Introduction to Software Testing
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Performing Security Auditing In Hardware
Sending data to EUROSTAT using STATEL and STADIUM web client
STATEL an easy way to transfer data
Presentation transcript:

ICE Tea Presentation 5 th October 2012 PLCs Security Author: Filippo Tilaro

Overview 2  Background  Scope and objectives  Fuzzing  Concepts and Features  Types of Fuzzing  Test-bench Implementation  Fuzzing implementation  DUT monitoring  Vulnerability Reporting System  Reproducibility ICE Tea Presentation 5 October 2012

Industrial Control System (ICS) Security  Possible Impacts:  Control process downtimes or failures, catastrophes  All CERN industrial environments: LHC machine, all experiments  Goals and Approach:  Define new security testing techniques  Improve the ICS robustness  Enhancing the previous phase methodologies  Including the Supervision level into analysis SIEMENS Openlab Security Project Sensors / Actuators Devices Process Control: PLCs Operation &Supervision: SCADA ICE Tea Presentation 5 October 2012

Scope  Objective  Improve the Process Control System (PCS) security level  More and more discovered vulnerabilities related to PCS  2010: VxWorks and STUXNET  2011: Sunway ForceControl and pNetPower, Beckhoff TwinCAT 'TCATSysSrv.exe' Network DoS, Rockwell RSLogix Overflow, Measuresoft ScadaPro, Cogent DataHub, AzeoTech DAQFactory Stack Overflow, Progea Movicon, ScadaTEC ModbusTagServer and ScadaPhone Remote Buffer Overflow, Scadatec Procyon 'Coreservice.exe' Stack Buffer Overflow, Siemens WinCC Flexible Runtime Heap Overflow, ActiveX in Advantech Broadwin WebAccess, Sunway ForceControl SCADA SHE, Control Microsystems (Schneider Electric) ClearSCADA Remote Authentication Bypass, Inductive Automation Ignition Disclosure, Siemens SIMATIC S7-300 Hardcoded Credentials, Password Protection Vulnerability in Siemens SIMATIC Controllers (S7-200,300,400,1200), Siemens SIMATIC S PLC, Honeywell ScanServer ActiveX Control Use-After-Free, DUQU as successor of STUXNET  Result: loss of process control, damage propagation to critical PCSs  Strategy  Design of a test-bench to evaluate the PCSs network robustness  Determine key cyber security aspects relevant to CERN ICE Tea Presentation 5 October 2012

Analysis of the security standards  Study and comparison of the ISA-99, NERC- CIP, IEC-62351, ISA-95  Understand the scope and the level of convergence of these different standards  Extract some security patterns and possible specific procedures in order to improve the system security level  Analyze the reliability and effectiveness of these standards’ guidelines ICE Tea Presentation 5 October 2012

ISA-99 Review  Benefits and Drawbacks of the general approach  Definition of common language  Process Control Systems and IT Systems  Improvements in the authentication process  Importance of the testing phase  Auditing in Process Control Devices  How to apply the risk analysis  Do not use “obscure network protocol”  Integration  A dynamic standard  An incomplete Defense-in-depth strategy ICE Tea Presentation 5 October 2012

Use of an open-source library: Libnodave  Possible Actions: Stop Run Read not-codified diagnostic information Read / Write Input Process Image Read / Write Output Process Image Read from / Write to Data-Block Read blocks and programs ICE Tea Presentation 5 October 2012

Protocol Robustness Testing  IEEE defines robustness “in the degree to which a system or component can function correctly in the presence of invalid inputs or stressful environmental conditions.“  What is a robustness failure?  Failure to return the expected packet  Inability to progress to next protocol state  Dropped connections  Lost or modified data  MORE IMPORTANT: Any unexpected effect in the process control! 8ICE Tea Presentation 5 October 2012

Why Fuzzing?  Brute Force Testing:  Simple but inefficient  Input space infinite  Not all the combinations are interesting  Fuzzing & Grammar Testing:  Not random: essential for debugging!  Not exhaustive but we can cover specific “meaningful” sequences  Context free grammar driven  Integration of the security specialists’ knowledge 9ICE Tea Presentation 5 October 2012

FUZZING TECHNIQUES 10ICE Tea Presentation 5 October 2012

11 What is fuzzing? A testing technique which generates random or pseudo random data structures as input of the system under test  You can fuzz:  Network protocols and stack implementations  Software applications, libraries and APIs  System I/O modules  File systems  … anything which takes arguments as input (surface of attack)  How to fuzz:  Black box model and White box model  Generation vs. mutation  Dumb or intelligent fuzzers  Easiness vs. performances and results  Short vs. long development time  Pattern matching, boundary ICE Tea Presentation 5 October 2012

12 3 types of fuzzing approach  Manual: iterative approach to run at each iteration a new test sequence  Semi-automatic:  Tiny scripts or programs to run singularly  Related to a specific context/application/protocol  Automatic:  Frameworks for the tests generation  Generic enough to be multi- context/application/protocol  Use of standard and reliable components  Easier to maintain in terms of growing number of tests  Need for a learning curve ICE Tea Presentation 5 October 2012

13 Why Peach?  Automatic Framework for the tests generation  Generic enough to be multi- context/application/protocols not like:  SNMP fuzzer, Protocol Independent Fuzzer (PIF)…  Use of standard and reliable software components  Scalable in terms of growing number of tests:  ‘xml’ files which can be classified  Make use of a script language:  Entirely written in Python  More dynamic than ‘C’ (Spike, sfuzz…) overall with string and generic datatypes management  More robust than trivial scripts (ethereal’s fuzz)  Need for a learning curve, but really customizable! ICE Tea Presentation 5 October 2012

14 Common fuzzing operations  Size field altering:  Invalid or unexpected values  Limit (0x0000,0xFFFF) or negative values (-1, -9999)  Smaller or bigger than the real values (buffer overflows against static arrays)  Large positive or unsigned numbers (playing with the sign bit)  Value field altering:  Invalid or unexpected values  Long or empty strings  Wrong Coding (binary, hex, text)  Marks for starting or ending of a field  Cross mutation and generation of fields:  Relationships among data fields  Checksums, encryption, hash, compression  Exploratory test of the system state machine:  Forcing state changes  Introducing Invalid states ICE Tea Presentation 5 October 2012

15 ISCI CRT Testing Phases  5 security testing phases:  Discover Protocol Functionalities and Attack Surface  Storms and Maximum Load Tests  Single Field Injection  Combinatorial Fields Injection  Cross State Fuzzing (for stateful protocols)  Fulfilling the ISCI CRT requirements:  Integration of the CRT test cases into the TRoIE ICE Tea Presentation 5 October 2012

TEST-BENCH IMPLEMENTATION 16ICE Tea Presentation 5 October 2012

Test-bench diagram 17 Attacker Target Partner Panel System Testing System Monitoring Configurator Traffic Analyzer Signals Monint. Extended Peach Fuzzing Reporting System Vulnerabilities DB Web front-end ICE Tea Presentation 5 October 2012

Fuzzing Testing Requirements  A Common Framework:  No standalone scripts  Scalability  Handle and organize the growing amount of tests (almost infinite combinations)  Tests Customization  Protocol header format  Protocol field values  Protocol state machine  Reproducibility  Essential for any debugging activity 18ICE Tea Presentation 5 October 2012

Configuration Data Model and States sequence Publishers and Mutators Mutation Strategy Initialization Context and State Machine Components initialization Running Packets generation Injection Testing Monitoring and Packets transmission Extended Fuzzing Framework 19 Target Packet ICE Tea Presentation 5 October 2012

 Data Model:  Definition of the protocol header  Specify the protocol field values  Indicate protocol field to mutate or to calculate (checksum)  Specify field format (string or number) and codification (hex)  Mutation Strategy  How to change the protocol fields values  State Machine  In case of Stateful protocol  Publisher  Send the specific protocol packet 20 Custom Fuzzing with Extended Peach ICE Tea Presentation 5 October 2012

DUT MONITORING 21ICE Tea Presentation 5 October 2012

22 PLC I/O Monitoring  Objective:  Detect any delay or anomaly in the device’s process control I/O during the phase of testing  Precedent solution with the use of another PLC: The analysis was affected by synchronization issues between the PLC under test and the monitoring one Low Analysis Time Resolution, not enough to fulfill the ISCI requirements  Current solution with a Digital Acquisition Card (DAC):  No synchronization issues and quite better time resolution than the previous one  First version has been released, but further tuning is required ICE Tea Presentation 5 October 2012

23 PLC I/O Monitoring Target Waveforms Comparison Feedback Control System:  No synchronization issues  Reduced PLC Scan Cycle for a best timing resolution Requirements:  3 sec period:1 sec High, 2 sec Low  PLC waveform generation  20 msec resolution  Parametric threshold jitter ICE Tea Presentation 5 October 2012

Cacti Server  A common solution: every device has its own MIBs and OIDs the SNMP protocol was not defined to this purpose (not efficient, not suitable for real-time) Not all resources cannot be checked using this network protocol  Network graphing solution for monitoring  SNMP protocol  Fast poller  Multiple data acquisition methods  Could manage hundreds of devices ICE Tea Presentation 5 October 2012

25 PLC Status Monitoring  Internal resources of the device under test:  Scan-cycle & execution time  Memory usage  CPU status  I/O signals memory & communication modules conditions.  No common way to query the device  Open-source library (libnodave)  Proprietary libraries (Siemens Softnet Linux lib)  Supported by the Siemens  Compatible with different versions of the same device model  Specific API to gather diagnostic information (New version tested and working!) ICE Tea Presentation 5 October 2012

26 Communication Monitoring System  Development of a web driven sniffer  Internal module of the TRoIE test-bench and communicating with other internal modules ICE Tea Presentation 5 October 2012

27 PLC Status monitoring  Previous existing CERN system:  PLC DIAMON with ‘libnodave’ (open-source library)  Siemens Softnet library  Development of a server-side monitoring system able to question the Siemens PLCs  Integration with the GWT client application within the TRoIE test-bench  NOT Finished yet! Softnet Server DLL based on Softnet PLC Agent Publishers: DIP/DIM, CMW, WinCC OA, WebService Communication ICE Tea Presentation 5 October 2012

 Cyclic communication with a deterministic period  Definition of the communication scan cycle(T)  Monitoring of the average value of T and its standard deviation: Traffic analyzer with Libnodave Establishment of a Communication load Traffic Analyzer (Average T, standard deviation) Graphic representation of the results through QtOctave ICE Tea Presentation 5 October 2012

Non-deterministic timeline and random delays in the communication Communication Mean Period Standard Deviation Communication Period  Configuration: Device Name: S7-400 Module: CPU 412-2XG04-0AB0 Serial Number: SVPS Firmware Version: Device Name: CP 443-1Advan. Module: 443-1EX40-0xE0 Firmware Version: 1.0 Device Name: DO422 Model: 422-1BL00-0AA0 ICE Tea Presentation 5 October 2012

REPORTING SYSTEM 30ICE Tea Presentation 5 October 2012

31 Testing Reporting System  No standard common format to store vulnerabilities  Vulnerability classification & query support:  Improve data analysis  Track progresses  Redeploy attacks  Check device version status ICE Tea Presentation 5 October 2012

32 E-R DB diagram ICE Tea Presentation 5 October 2012

REPRODUCIBILITY 33ICE Tea Presentation 5 October 2012

34 Fuzzing Test Generator Target Customized Peach Fuzzing Framework Grammars INPUTGEN.  Generation and forging of any kind of communication load  Translate experts’ knowledge into grammar rules  Definition of proprietary and even not-existing protocols  Scalable in terms of:  Testing files  Protocol testing behavior (state-machine, mutation strategies) ICE Tea Presentation 5 October 2012

35 Test-bench User Interface  Main objectives:  Ability to run the tests against specific targets but not to change test definitions  Built-in or produced as a part of the TRoIE framework  No specific security knowledge is necessary  No client-side installation required  Client Compatibility with both Windows and Linux  Automated Start/Stop of tests  Authentication to run a test  Achievement:  First implementation has been released to Siemens, but further developments are required ICE Tea Presentation 5 October 2012

36 Test-bench Reproducibility 3-Layers Architecture Extended Peach Framework REST Web Service Reverse Proxy & Access Control Client JSON  Authentication to run a test  Built-in invariant test definitions  No specific security knowledge  OS Compatibility ICE Tea Presentation 5 October 2012

Reproduce Attack Sequences  TCPReplay (Unix suite) tcpreplay: replays pcap files at arbitrary speeds onto the network Tcprewrite: pcap file editor (Network Layer 2, 3 and 4 headers) Tcpprep: pcap file pre-processor  TCPDump: command line packet analyzer  JTCPReplay OpenLab developed tool Reproduce the packets sequence handling TCP connections (sequence and ack numbers) It is only a “prototype” which could be useful to share and reproduce vulnerabilities Packets Sequence JTCPReplay Packets Handler SnifferSender ICE Tea Presentation 5 October 2012

RUN PEACH TEST CASES 38ICE Tea Presentation 5 October 2012

 From the console:  Running the agent: ‘python peach –a‘  Running Peach: ‘python peach.py –strategy=Strategy testFile.xml’  From the Web: How to run a test Peach host Select the list of Tests Parameters to run Peach ICE Tea Presentation 5 October 2012

Security Tests Download 40 REST Web Service Security Tests IP ICMP TCP Test1.xml Test2.xml Test1.xml ICE Tea Presentation 5 October 2012

41 Any Questions Thank you for attending! ICE Tea Presentation 5 October 2012