Secure Software Updates via Integrity Protection

advertisement
Secure Software Updates
via Integrity Protection
IoT Show North America, Chicago IL
April 16, 2015
Marcellus Buchheit
President and CEO
mabu@wibu.com
Page 1/35
Agenda
Security Challenge: Internet Connection
Security Challenge: Open System Architecture
Some Cryptographic Basics
Solution: Code Integrity
Technical Implementation Details
Summary
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 2/35
Security Challenge
Internet Connection
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 3/35
Embedded Systems: Situation Today
┐ Most embedded systems are still “stand alone”
┐ Most used interfaces (if any): USB and LAN Ethernet
 Comparable with desktop PCs before Netscape
 Comparable with cell phones before iPhone
┐ Some remote access using land line phone and/or radio wireless
This will all change with Internet Of Things
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 4/35
Security Challenge “Internet Connection”
┐ Embedded system can be directly accessed/attacked via internet
 Principle protection: Firewalls etc.
┐ Execution code updates can be polluted
 Redirected code source: Hacker’s malicious code looks like new code update
 Execution code modified during download process
 Firewalls can protect but are difficult to manage by operation people
┐ Weakness in code can be used to infiltrate malicious code
 Example: Weak internet access parameter validation
 Buffer Overruns
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 5/35
Security Challenge
Open System Architecture
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 6/35
Embedded Systems Today: Many are “closed”
┐ Many systems have simple software logic
 All the software is in-house developed
 Closed architecture, information outside of manufacturer difficult to get
• Seems as black box for users, administrators and hackers
• A successful hack typically needs a physical access to the system
• Reverse-engineering of architecture required before hack is possible
┐ But such simple systems will disappear sooner or later
 IoT requires complex interaction with a complex outside world
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 7/35
Embedded Systems Tomorrow: Most will be “open”
┐ Prediction: Embedded systems will go the way of PCs and cell phones
┐ Reason: Much more complex software than today:







Graphical user interface
Complex memory management
Multithreading and multiprocessing
Remote access for administration
Access to complex control devices and/or sensors
Internet access
Complex internet protocols: HTTPS, SOAP, JSON etc.
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 8/35
Embedded Systems Tomorrow: Most will be “open” (II)
┐ Result: Not even large companies will develop everything “in-house”
┐ More components will be used (similar to PCs and smart phone):
 An open operating system for a specific purpose
• Linux, Windows Industry, VxWorks, QNX, RIO and many highly-specialized still coming
 Open source libraries, static-link libraries, dynamic-link libraries, applets,
applications, device drivers
 Access to cloud/big-data: Code will be provided from service provider
┐ All these components need standardized interfaces
on a standardized platform
Summary: Only open/standardized systems can fulfill the future demands
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 9/35
Security Challenge “Open Systems”
┐ Hacker has same information available as developer
┐ Hacker can use powerful development/analysis tools
 Debugger, Disassembler, Source-Reverser etc.
┐ Hacker knows execution code binary structure
 Direct modification on the executable file: Static attack
┐ Hacker knows memory and process architecture
 Inserting of malicious code into the process space: Dynamic attack
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 10/35
Some “Real Life” Hacks…
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 11/35
Credit Card Hack: Attack an ATM machine
┐ ATM with Windows XP
┐ Drill hole in case, attach USB stick
┐ Reboot ATM (by power off/power on)
┐ Boot from USB stick, install malware
┐ Remove USB stick, reboot ATM
┐ Malware activated by secret keypad input
 Two-key authentication via cell phone guaranteed controlled access
┐ Special keypad input instantly withdraws bills without trace
http://www.securityweek.com/skillful-hackers-drained-atms-using-malware-laden-usb-drives
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 12/35
Target Credit Card Hack: Attack the POS systems
┐ Between Thanksgiving and Christmas 2013
 Most busy retail shopping time in the year
┐ Remote access through internet at POS to install malware
 Used weak access security of Target partner company
┐ Malware at POS tracked all swiped credit card information
 Uploaded to Target server at hidden location
 Downloaded by hackers over night with slow speed
 Target’s problem: FireFly server security software was disabled
┐ Result: 40 million credit cards and
70 million addresses/personal information stolen
http://krebsonsecurity.com/2014/02/target-hackers-broke-in-via-hvac-company/
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 13/35
Stuxnet: Attack Programmable Logic Controllers (PLC)
┐ Windows computer worm
┐ Attacked Siemens Step 7 software to program PLCs
 Modified files created by interactive software
before they are copied to USB drive
 Modified PLC control software on USB drive
was uploaded into Siemens PLC
┐ Was only effective in Iran at PLCs to control
centrifuges to enrich nuclear material
┐ Result: destroyed about 20% of the centrifuges
https://en.wikipedia.org/wiki/Stuxnet and book of Kim Zetter:
“Countdown to Zero Day: Stuxnet and the Launch of the Word’s First Digital Weapon
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 14/35
Some Cryptographic Basics
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 15/35
Some Cryptographic Basics
Symmetric Encryption/Decryption
Asymmetric Encryption/Decryption
Hash Function
Signature and Authentication
Certificate
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 16/35
Symmetric Encryption / Decryption
┐ Shared secret key
 Same key for encryption and decryption
┐ Faster then asymmetric cryptography
┐ Examples: DES, Triple DES, Blowfish, AES
┐ Challenges:
 Key exchange: needs secret path
 Key storage: vulnerable for hacks
 Authentication not possible
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 17/35
Asymmetric Cryptography
┐ Private/public key pair
 Private Key
 Public Key
┐ Examples: RSA, elliptic curve
┐ Asymmetric encryption
 Sender uses receiver’s public key for encryption
 Receiver uses his private key for decryption
┐ Signatures
 Sender uses private key to sign plain text data
 Receiver uses sender’s public key to verify
the plain text data signature
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 18/35
Hash Functions and Signatures
┐ Hash generates fingerprint of data
┐ Large amount of data reduced to small
fingerprints
 Example: SHA-256 with 32 bytes
 Difference to checksum, CRC-32 etc:
no reverse-calculation possible
┐ Often used in combination with signatures
 Create hash value
 Authenticate hash value (sign)
with private key
 Verify hash value with public key
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 19/35
Certificates
┐ A certificate is a standardized public key (X.509 format)
┐ Challenge:
 Public key must be authentic (not forged)
┐ Solution:
 Trusted party: Certificate Authority (CA)
 CA signs public key plus credential data
• Optional use of certificate chain
 Public key of CA (root key) is used to verify certificate
 After verification: Public key of certificate can be used
 Credentials can be used after verified by public key of certificate
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 20/35
Solution:
Code Integrity
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 21/35
Code Integrity: The Principle
Development
Private
Key
Public
Key
x
Application
Code
Signature
EXE0000TEXT11DATA0
22CODE3355RES44ASM
0000PICT1111DATA88
44CODE77DATA33TEXT
9999TEXT88RES66ASM
License
Key
Encrypt Code
Embedded System
Code
Signature
License
Key
Application
Certificate
Verify
Code
Decrypt
Code
x
EXE3A9C21C8DF31E73
4933D2818D875CF660
45D814A56C29148A39
81C369A1793F175E39
79235F165B84C841B8
Grant
Code Execution
yes/no
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 22/35
Code Integrity: The Results
┐ Execution Code is authenticated:
 Can only be created by developer, no other source possible
 Cannot be modified during delivery or on embedded system
┐ Execution Code is encrypted:
 Cannot be easily reverse engineered by hacker, competitor etc.
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 23/35
Code Integrity: New Challenges
Embedded System
Code
Signature
License
Key
Application
Certificate
Verify
Code
Decrypt
Code
x
EXE3A9C21C8DF31E73
4933D2818D875CF660
45D814A56C29148A39
81C369A1793F175E39
79235F165B84C841B8
Grant
Code Execution
yes/no
┐ Who verifies the Verifier?
 Hacker could remove the Code Verifier and force Code Execution Grant
 Hacker can then start his own malicious code
┐ Solution: Code Verifier in the loader must be verified as well
┐ Finally the whole boot process including OS must be verified
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 24/44
Technical Implementation
Details
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 25/35
Header
Header
Keys for
Encryption
Keys for
Code Signing
Original Code
ExProtector
Encrypted Code
Credentials
(Hash, Signature, …)
Protected Executable / Library
Original Executable / Library
ExProtector: Automatic Protection Process
Typically no source modification necessary
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 26/35
Header
Header
Keys for
Encryption
Keys for
Code Signing
Original Code
ExProtector
Encrypted Code
AES Key (FSB)
ECC Private Key
Credentials
(Hash, Signature, …)
Protected Executable / Library
Original Executable / Library
ExProtector: Keys and Credentials
Encrypted
Random AES Key
Firm Code and
Product Code
Hash
Signature
Certificate(s)
Certificate(s)
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 27/35
Header
Public
Root Key
Header
License with
Firm Code and
Product Code
Encrypted Code
ExEngine
Decrypted Code
(“Original Code”)
Credentials
Credentials
(Hash, Signature, …)
(Hash, Signature, …)
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Memory of Embedded Device
Protected Executable / Library
ExProtector: During Runtime - Load of Executable
Additional
Security:
Watchdog
against
Memory
modification
Page 28/35
ExProtector: Integration into Loader
Operating System
(without modification)
Operating System
(for ExProtector)
Original Loader
Modified Loader
Engineering
ExEngine
(ExProtector
Runtime)
CodeMeter
Embedded Driver
Root Public Key
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 29/35
Forward and Backward Check
Loader
Load
Protected
Application
Check
Start
Credentials
Credentials
(Hash, Signature, …)
Check
Application
Certificate
(Hash, Signature, …)
Loader
Certificate
Time
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 30/35
Secure Boot: Cascaded Security Chain
Application / Driver etc.
Load
Check
Start
Check
Start
Check
Start
Check
Operating System (VxWorks, …)
Load
Check
Boot Loader (UEFI, …)
Load
Check
Hardware / Pre-Boot Loader
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 31/35
Practical Implementation
┐ Integrity Protection provided by CodeMeter Embedded
┐ Available today for:
 WindRiver VxWorks version 7
 Some Linux variants
• Demonstration for Rasberry Pi available (https://www.raspberrypi.org)
 Adoption to other embedded systems platforms in future available
• Ask for demand/availability
 Security credentials can be stored as files or in external security hardware
• CodeMeter CmDongle security storage
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 32/35
Summary
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 33/35
Summary: Code Integrity
┐ Embedded Systems in the internet (“Internet of Things”)
is a serious security threat
┐ Using open platform designs will simplify malicious attacks
 Hacker has easily detailed information available
┐ Market will force Internet of Things and Open Platform designs
┐ Code Integrity guarantees authenticated, encrypted code
┐ Code Encryption prevents reverse engineering of code
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 34/35
More Information
Company
Speaker
┐ Wibu-Systems USA Inc.
 www.wibuusa.com
┐ US subsidiary of
Wibu-Systems AG in Germany
 www.wibu.com
┐ Marcellus Buchheit,
President and CEO
┐ mabu@wibu.com
┐ www.linkedin.com/in/mabuus
Wibu-Systems USA presentation for IoT Show North America - Chicago IL - April 16, 2015
Page 35/35
Download