cybersecurity for iot verify your software today
play

Cybersecurity for IoT: Verify your Software Today! Allan Blanchard, - PowerPoint PPT Presentation

Cybersecurity for IoT: Verify your Software Today! Allan Blanchard, Nikolai Kosmatov (based on a tutorial prepared with Frdric Loulergue) Outline Introduction Verification of absence of runtime errors using Frama-C/Eva Deductive


  1. Cybersecurity for IoT: Verify your Software Today! Allan Blanchard, Nikolai Kosmatov (based on a tutorial prepared with Frédéric Loulergue)

  2. Outline Introduction Verification of absence of runtime errors using Frama-C/Eva Deductive verification using Frama-C/WP Runtime Verification using Frama-C/E-ACSL Conclusion A. Blanchard, N. Kosmatov Cybersecurity for IoT: Verify your Software Today! FIC 2019 2 / 48

  3. Introduction Security in the IoT Outline Introduction Security in the IoT An overview of Frama-C The Contiki operating system Verification of absence of runtime errors using Frama-C/Eva Deductive verification using Frama-C/WP Runtime Verification using Frama-C/E-ACSL Conclusion A. Blanchard, N. Kosmatov Cybersecurity for IoT: Verify your Software Today! FIC 2019 3 / 48

  4. Introduction Security in the IoT Internet of Things ◮ connect all devices and services ◮ 46 billions devices by 2021 ◮ transport huge amounts of data (c) Internet Security Buzz A. Blanchard, N. Kosmatov Cybersecurity for IoT: Verify your Software Today! FIC 2019 4 / 48

  5. Introduction Security in the IoT And Security? A. Blanchard, N. Kosmatov Cybersecurity for IoT: Verify your Software Today! FIC 2019 5 / 48

  6. Introduction Security in the IoT And Security? A. Blanchard, N. Kosmatov Cybersecurity for IoT: Verify your Software Today! FIC 2019 5 / 48

  7. Introduction Security in the IoT And Security? A. Blanchard, N. Kosmatov Cybersecurity for IoT: Verify your Software Today! FIC 2019 5 / 48

  8. Introduction Security in the IoT And Security? A. Blanchard, N. Kosmatov Cybersecurity for IoT: Verify your Software Today! FIC 2019 5 / 48

  9. Introduction Security in the IoT And Security? A. Blanchard, N. Kosmatov Cybersecurity for IoT: Verify your Software Today! FIC 2019 5 / 48

  10. Introduction An overview of Frama-C Outline Introduction Security in the IoT An overview of Frama-C The Contiki operating system Verification of absence of runtime errors using Frama-C/Eva Deductive verification using Frama-C/WP Runtime Verification using Frama-C/E-ACSL Conclusion A. Blanchard, N. Kosmatov Cybersecurity for IoT: Verify your Software Today! FIC 2019 6 / 48

  11. Introduction An overview of Frama-C Frama-C Open-Source Distribution Framework for Analysis of C source code http://frama-c.com ◮ offers a specification language called ACSL ◮ targets both academic and industrial usage A. Blanchard, N. Kosmatov Cybersecurity for IoT: Verify your Software Today! FIC 2019 7 / 48

  12. Introduction An overview of Frama-C Frama-C, a Collection of Tools Several tools inside a single platform ◮ plugin architecture like in Eclipse ◮ over 20 plugins in the open-source distribution ◮ also close-source plugins, either at CEA (about 20) or outside ◮ a common kernel ◮ provides a uniform setting ◮ provides general services A. Blanchard, N. Kosmatov Cybersecurity for IoT: Verify your Software Today! FIC 2019 8 / 48

  13. Introduction An overview of Frama-C Plugin Gallery Eva Jessie Wp Aora¨ ı RTE Abstract Interpretation Specification Generation Deductive Verification Slicing Sparecode Formal Methods PathCrawler E-ACSL Clang Plugins Code Transformation Dynamic Analysis StaDy Semantic constant folding Browsing of unfamiliar code Sante Ltest Metrics Callgraph Impact Occurrence Scope & Data-flow browsing A. Blanchard, N. Kosmatov Cybersecurity for IoT: Verify your Software Today! FIC 2019 9 / 48

  14. Introduction An overview of Frama-C Use the Right Tool for the Right Task We may want to assure different degrees of confidence: ◮ absence of runtime errors or functional correctness ◮ partial/complete analysis (testing vs. verification) Different tools require from us more or less work: ◮ Just provide the source code ◮ Configure tool parameters ◮ Provide code annotations The higher the confidence is, the more information we have to provide A. Blanchard, N. Kosmatov Cybersecurity for IoT: Verify your Software Today! FIC 2019 10 / 48

  15. Introduction The Contiki operating system Outline Introduction Security in the IoT An overview of Frama-C The Contiki operating system Verification of absence of runtime errors using Frama-C/Eva Deductive verification using Frama-C/WP Runtime Verification using Frama-C/E-ACSL Conclusion A. Blanchard, N. Kosmatov Cybersecurity for IoT: Verify your Software Today! FIC 2019 11 / 48

  16. Introduction The Contiki operating system A lightweight OS for IoT Contiki is a lightweight operating system for IoT It provides a lot of features: ◮ (rudimentary) memory and process management ◮ networking stack and cryptographic functions ◮ ... Typical hardware platform: ◮ 8, 16, or 32-bit MCU (little or big-endian), ◮ low-power radio, some sensors and actuators, ... ms Group Note for security: there is no memory protection unit. A. Blanchard, N. Kosmatov Cybersecurity for IoT: Verify your Software Today! FIC 2019 12 / 48

  17. Introduction The Contiki operating system Contiki: Typical Applications ◮ IoT scenarios: smart cities, building automation, ... ◮ Multiple hops to cover large areas ◮ Low-power for battery-powered scenarios ◮ Nodes are interoperable and addressable (IP) Traffjc lights Parking spots Public transport Street lights Smart metering … Light bulbs Thermostat Power sockets CO2 sensors Door locks Smoke detectors 5 5 SICS Networked Embedded Systems Group … Sics th Sense A. Blanchard, N. Kosmatov Cybersecurity for IoT: Verify your Software Today! FIC 2019 13 / 48

  18. Verification of absence of runtime errors using Frama-C/Eva Runtime errors and the Eva plugin Outline Introduction Verification of absence of runtime errors using Frama-C/Eva Runtime errors and the Eva plugin Simple Example An application to Contiki Deductive verification using Frama-C/WP Runtime Verification using Frama-C/E-ACSL Conclusion A. Blanchard, N. Kosmatov Cybersecurity for IoT: Verify your Software Today! FIC 2019 14 / 48

  19. Verification of absence of runtime errors using Frama-C/Eva Runtime errors and the Eva plugin Runtime errors Runtime errors in C are undefined behaviors: ◮ out-of-bound accesses, ◮ integer overflows, ◮ division by 0, ◮ invalid pointers ◮ . . . They can raise important security issues ◮ For example, HeartBleed vulnerability (found in 2014 in OpenSSL) A. Blanchard, N. Kosmatov Cybersecurity for IoT: Verify your Software Today! FIC 2019 15 / 48

  20. Verification of absence of runtime errors using Frama-C/Eva Runtime errors and the Eva plugin Value Analysis Overview Compute possible values of variables at each program point ◮ an automatic analysis based on abstract interpretation ◮ computes a correct over-approximation ◮ reports alarms for potential runtime errors ◮ reports alarms for potentially invalid annotations ◮ can prove the absence of runtime errors ◮ graphical interface: displays the domains of each variable A. Blanchard, N. Kosmatov Cybersecurity for IoT: Verify your Software Today! FIC 2019 16 / 48

  21. Verification of absence of runtime errors using Frama-C/Eva Simple Example Outline Introduction Verification of absence of runtime errors using Frama-C/Eva Runtime errors and the Eva plugin Simple Example An application to Contiki Deductive verification using Frama-C/WP Runtime Verification using Frama-C/E-ACSL Conclusion A. Blanchard, N. Kosmatov Cybersecurity for IoT: Verify your Software Today! FIC 2019 17 / 48

  22. Verification of absence of runtime errors using Frama-C/Eva Simple Example Example 1 Run Eva: frama-c-gui div1.c -val -main=f int f ( int a ) { int x, y; int sum, result; if (a == 0) { x = 0; y = 0; } else { x = 5; y = 5; } sum = x + y; // sum can be 0 result = 10/sum; // risk of division by 0 return result; } A. Blanchard, N. Kosmatov Cybersecurity for IoT: Verify your Software Today! FIC 2019 18 / 48

  23. Verification of absence of runtime errors using Frama-C/Eva Simple Example Example 1 Run Eva: frama-c-gui div1.c -val -main=f int f ( int a ) { int x, y; int sum, result; if (a == 0) { x = 0; y = 0; } else { x = 5; y = 5; } sum = x + y; // sum can be 0 result = 10/sum; // risk of division by 0 return result; } Risk of division by 0 is detected, it is real. A. Blanchard, N. Kosmatov Cybersecurity for IoT: Verify your Software Today! FIC 2019 18 / 48

  24. Verification of absence of runtime errors using Frama-C/Eva Simple Example Example 2 Run Eva: frama-c-gui div2.c -val -main=f int f ( int a ) { int x, y; int sum, result; if (a == 0) { x = 0; y = 5; } else { x = 5; y = 0; } sum = x + y; // sum cannot be 0 result = 10/sum; // no div. by 0 return result; } A. Blanchard, N. Kosmatov Cybersecurity for IoT: Verify your Software Today! FIC 2019 19 / 48

  25. Verification of absence of runtime errors using Frama-C/Eva Simple Example Example 2 Run Eva: frama-c-gui div2.c -val -main=f int f ( int a ) { int x, y; int sum, result; if (a == 0) { x = 0; y = 5; } else { x = 5; y = 0; } sum = x + y; // sum cannot be 0 result = 10/sum; // no div. by 0 return result; } Risk of division by 0 is detected, but it is a false alarm. A. Blanchard, N. Kosmatov Cybersecurity for IoT: Verify your Software Today! FIC 2019 19 / 48

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend