SCADA STRANGELOVE SCADA.SL Sergey Gordeychik Internets Aleksandr - - PowerPoint PPT Presentation

scada strangelove
SMART_READER_LITE
LIVE PREVIEW

SCADA STRANGELOVE SCADA.SL Sergey Gordeychik Internets Aleksandr - - PowerPoint PPT Presentation

SCADA STRANGELOVE SCADA.SL Sergey Gordeychik Internets Aleksandr Timorin StrangeLove movie and other Gleb Gritsai *All pictures are taken from Dr Group of security researchers focused on ICS/SCADA Alexander Timorin Dmitry Serebryannikov


slide-1
SLIDE 1
slide-2
SLIDE 2

*All pictures are taken from Dr StrangeLove movie and other Internets

Sergey Gordeychik Aleksandr Timorin Gleb Gritsai

SCADA STRANGELOVE

SCADA.SL

slide-3
SLIDE 3

 Group of security researchers focused on ICS/SCADA

to save Humanity from industrial disaster and to keep Purity Of Essence

Alexander Timorin Alexander Tlyapov Alexander Zaitsev Alexey Osipov Andrey Medov Artem Chaykin Denis Baranov Dmitry Efanov Dmitry Nagibin Dmitry Serebryannikov Dmitry Sklyarov Evgeny Ermakov Gleb Gritsai Ilya Karpov Ivan Poliyanchuk Kirill Nesterov Roman Ilin Sergey Bobrov Sergey Drozdov Sergey Gordeychik Sergey Scherbel Timur Yunusov Valentin Shilnenkov Vladimir Kochetkov Vyacheslav Egoshin Yuri Goltsev Yuriy Dyachenko

slide-4
SLIDE 4

Aleksandr Timorin ICS security researcher Industrial protocols fan and 0-day PLC hunter SCADAStrangeLove team member The Ocean band fan atimorin atimorin@protonmail.ch

slide-5
SLIDE 5
  • ICS basics 101
  • Vulnerabilities
  • Input validation
  • Design and architecture
  • Safety and security as a whole
slide-6
SLIDE 6

What is ICS world and why we should develop carefully

  • Today is the digital era (welcome back captain obvious!)
  • Automated processes is everywhere – from home

automation to big energy plants, from brewery to traffic control systems

slide-7
SLIDE 7

What is ICS world and why we should develop carefully

  • Industry automatization processes becoming more

comfortably for engineers and operators

slide-8
SLIDE 8

What is ICS world and why we should develop carefully

  • Switching from analog to digital brings old and absolutely not

secure software development process

slide-9
SLIDE 9

What type of ICS products are vulnerable:

  • Client/Server software
  • Field devices: RTU, PLC, protective relays, power meters,

converters, actuators and so on

  • Network switches, gateways
  • GSM/GPRS modems, wireless AP
  • Mobile applications
  • Industrial protocols
  • Human factor
slide-10
SLIDE 10

Analytics and statistics of ICS vulnerabilities

  • Analyzed CVE since ~2010
  • Data source: ics-cert.us-cert.gov
  • CVE details: NVD
  • Total unique CVE: 689
  • CVSS 2.0: min score 1.7 , max score 10.0 , avg score 6.5 ,

high and critical count of scores 285 (41%)

slide-11
SLIDE 11

Analytics and statistics of ICS vulnerabilities

  • CWE statistics:

CWE - Common Weakness Enumeration Definitions and full detailed description at https://nvd.nist.gov/cwe.cfm Unique number of CWE = 43

slide-12
SLIDE 12

Analytics and statistics of ICS vulnerabilities

  • CWE statistics (TOP 20):

$ sort cwe.all.raw | uniq -c | sort –nr | head -20

slide-13
SLIDE 13

Analytics and statistics of ICS vulnerabilities

  • CWE statistics (TOP 20):
slide-14
SLIDE 14

Buffer Errors Information Leak / Disclosure Input Validation Permissions, Privileges, and Access Control XSS Cryptographic Issues Credentials Management Resource Management Errors Path Traversal Authentication Issues Use of Hard-coded Credentials CSRF Improper Access Control SQL Injection Unrestricted Upload of File with Dangerous Type Untrusted Search Path Security Features Code Injection NULL Pointer Dereference Numeric Errors Other (after TOP20)

slide-15
SLIDE 15
slide-16
SLIDE 16
  • Honeywell EPKS, CVE-2014-9189
slide-17
SLIDE 17
  • Honeywell EPKS, CVE-2014-9187
slide-18
SLIDE 18
  • cb is a buffer size
slide-19
SLIDE 19
slide-20
SLIDE 20
  • SpiderControl SCADA Web Server, stack-based bof, CVE-

2015-1001

slide-21
SLIDE 21
  • Siemens SIPROTEC 7SJ64 (protective relay) XSS
slide-22
SLIDE 22
  • Siemens WinCC
slide-23
SLIDE 23
slide-24
SLIDE 24
slide-25
SLIDE 25

PLC 1 PLC 2 PLC 3

Some networks WinCC Web-Client WinCC SCADA- Clients

WinCC SCADA- Client +Web- Server

WinCC DataMonitor WinCC Web-Client WinCC DataMonitor WinCC Servers

LA N PROFINET PROFIBU S

Internet, corp lan, vpn’s Engineering station (TIA portal/PCS7)

slide-26
SLIDE 26

WinCCExplorer.exe/PdlRt.exe Create and use your own security features Instead of standard features – that’s A bad idea!

slide-27
SLIDE 27
  • Hardcodes are for protocols with auth: SNMP, telnet, HTTP,

etc.

  • You can hardcode keys, certificates, passwords
  • SMA Sunny WebBox
slide-28
SLIDE 28
  • Siemens SIPROTEC 4 protective relay confirmation code

“311299”:

  • System log
  • Device info
  • Stack and other

parts of memory

  • More ?
slide-29
SLIDE 29
  • Siemens SIPROTEC 4 protective relay confirmation code

“311299”:

“SIPROTEC 4 and SIPROTEC Compact devices allow the display of extended internal statistics and test information… To access this information, the confirmation code “311299” needs to be provided when prompted.” “...Siemens does not publish official documentation on these

  • statistics. It is strongly recommended to work together with

Siemens SIPROTEC customer care or commissioning experts to retrieve and interpret the statistics and test information...”

slide-30
SLIDE 30
  • Siemens S7-1200 PLC, CVE-2014-2252

“An attacker could cause the device to go into defect mode if specially crafted PROFINET packets are sent to the device. A cold restart is required to recover the system. ” Just “set” PROFINET request: set network info (ip, netmask, gateway) with all zero values.

slide-31
SLIDE 31

Not secure by design: default credentials, autocomplete

  • Defaults, factory settings (sometimes unchangeable) is

everywhere SCADA StrangeLove Default/Hardcoded Passwords List https://github.com/scadastrangelove/SCADAPASS

slide-32
SLIDE 32

KIOSK mode: Limit access to OS functions

slide-33
SLIDE 33

KIOSK mode: Limit access to OS functions

slide-34
SLIDE 34
  • Wincc accounts: “secret” crypto key
slide-35
SLIDE 35
  • WinCC accounts: “secret” crypto key fixed
  • It’s XOR, they should not bother hardcoding for XOR
slide-36
SLIDE 36

PLC password “encryption”

Password (8 bytes)

slide-37
SLIDE 37
  • TIA Portal PEData.plf passwords history
slide-38
SLIDE 38
  • Winccwebbridge.dll: please hash your hardcoded account
slide-39
SLIDE 39
  • Siemens S7-1200, S7-1500 PLC, CVE-2014-2250, CVE-

2014-2251

slide-40
SLIDE 40
  • Siemens S7-1200, S7-1500 PLC, CVE-2014-2250, CVE-

2014-2251

  • Seed = plc_start_time + const
slide-41
SLIDE 41

Target – Siemens S7-1200 PLC

slide-42
SLIDE 42

Profinet “feature” and PRNG vulnerability - real attack vector. Result - PLC takeover.

slide-43
SLIDE 43
  • Hash passwords
  • SHA is not good enough
  • Put length of plaintext nearby

Redbox_value = len(pwd)*2+1

slide-44
SLIDE 44

Architecture looks like ideal (from developers point of view)

slide-45
SLIDE 45

Reality looks like ideal too (from attacker point of view)

slide-46
SLIDE 46

Reality looks like ideal too (from attacker point of view)

slide-47
SLIDE 47

Many vendors tend to develop bicycles own services (ftp, telnet, ssh, http etc.) Guten Tag WinCC:

  • WinCC Server

Windows/MSSQL based SCADA

  • WinCC Client (HMI)

WinCC runtime + project

  • WinCC Web Server (WebNavigator)

IIS/MSSQL/ASP/ASP.NET/SOAP

  • WinCC WebClient (HMI)

ActiveX/HTML/JS

slide-48
SLIDE 48

Third-party services:

  • deploying with default and example.config configurations (i.e.

lot of busybox based devices with default root account)

  • No patches and updates
slide-49
SLIDE 49

Mirai DDos botnet DVR, NVR, IP cameras Over 0.5 million IoT devices are vulnerable What’s the problem? Hardcoded root:xc3511 Moreover, not so easy to change it

slide-50
SLIDE 50
slide-51
SLIDE 51

to get firmware? to get debug symbols? to debug? ..PowerPC no “operation system”

slide-52
SLIDE 52
slide-53
SLIDE 53
slide-54
SLIDE 54

― Interlocking security (by Jakob Lyng Petersen)

  • Trains must not collide
  • Trains must not derail
  • Trains must not hit person working the tracks

—Sadly, animals can’t handle the interview

― Formal methods and verification (rtfm)

  • B Method, Event B

—Underground rail network in Beijing, Milan and Sao Paulo

  • Prover.com

—Sweden, USA

slide-55
SLIDE 55

― Safety critical systems ― Abstract machines + formal methods ― Atelier B

  • Available IDE and C translator
  • No Ada translator

― Newer version – Event-B

  • See Rodin framework
slide-56
SLIDE 56
slide-57
SLIDE 57
slide-58
SLIDE 58
  • “Everything will be C in the end. If it's not C, it's not the end.”

– almost John Lennon

slide-59
SLIDE 59

― KVB: Alstom

  • Automatic Train Protection for the French railway company (SNCF),

installed on 6,000 trains since 1993

—60,000 lines of B; 10,000 proofs; 22,000 lines of Ada

― SAET METEOR: Siemens Transportation Systems

  • Automatic Train Control: new driverless metro line 14 in Paris (RATP),
  • 1998. 3 safety-critical software parts: onboard, section, line

—107,000 lines of B; 29,000 proofs; 87,000 lines of Ada

― Roissy VAL: ClearSy (for STS)

  • Section Automatic Pilot: light driverless shuttle for Paris-Roissy airport

(ADP), 2006

—28,000+155,000 lines of B; 43,000 proofs; 158,000 lines of Ada

slide-60
SLIDE 60
slide-61
SLIDE 61
slide-62
SLIDE 62
  • RTFM
  • SSDLC
  • ICS best practices
  • Follow CERTs
  • Common Weakness Enumeration at cwe.mitre.org
  • More practice: OWASP TOP 10
  • TESTING TESTING AND TESTING AGAIN!
slide-63
SLIDE 63
  • Mr. ICS developer, are you creating your products within

SSDLC concepts?

slide-64
SLIDE 64

*All pictures are taken from google and other Internets Alexander Timorin Alexander Tlyapov Alexander Zaitsev Alexey Osipov Andrey Medov Artem Chaykin Denis Baranov Dmitry Efanov Dmitry Nagibin Dmitry Serebryannikov Dmitry Sklyarov Evgeny Ermakov Gleb Gritsai Ilya Karpov Ivan Poliyanchuk Kirill Nesterov Roman Ilin Sergey Bobrov Sergey Drozdov Sergey Gordeychik Sergey Scherbel Timur Yunusov Valentin Shilnenkov Vladimir Kochetkov Vyacheslav Egoshin Yuri Goltsev Yuriy Dyachenko

slide-65
SLIDE 65