writing secure html5 applications for automotive systems€¦ · feb 2, 2016 2 writing secure html5...

18
Writing secure HTML5 applications for automotive systems Manuel BACHMANN + <[email protected]>

Upload: others

Post on 17-Aug-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Writing secure HTML5 applications for automotive systems€¦ · Feb 2, 2016 2 Writing secure HTML5 applications for automotive Introduction HTML5 application development Modern development

Writing secureHTML5 applications

for automotive systems

Manuel BACHMANN+ <[email protected]>

Page 2: Writing secure HTML5 applications for automotive systems€¦ · Feb 2, 2016 2 Writing secure HTML5 applications for automotive Introduction HTML5 application development Modern development

Feb 2, 2016 2

Writing secure HTML5 applications for automotive

● Introduction

● HTML5 application development● Modern development methods● Platform APIs as HTTP REST APIs

● Application framework platform design

● Application Framework Manager● Application Framework Binders(s)

● Privilege isolation through SMACK and Cynara● SMACK labels, Cynara policies● Security for Application Framework Binder

Table of contents

Page 3: Writing secure HTML5 applications for automotive systems€¦ · Feb 2, 2016 2 Writing secure HTML5 applications for automotive Introduction HTML5 application development Modern development

Feb 2, 2016 3

Introduction

● Homescreen● AM/FM radio● HVAC control

● Geolocation● Media Player● Phone

● Rear cameras● Navigation helper● Application manager

What is an automotive system ?

Page 4: Writing secure HTML5 applications for automotive systems€¦ · Feb 2, 2016 2 Writing secure HTML5 applications for automotive Introduction HTML5 application development Modern development

Feb 2, 2016 4

Introduction

Sample : Renesas Porter (R-Car M2)

Page 5: Writing secure HTML5 applications for automotive systems€¦ · Feb 2, 2016 2 Writing secure HTML5 applications for automotive Introduction HTML5 application development Modern development

Feb 2, 2016 5

Introduction

● For developers● support modern HTML5/JavaScript frameworks

(AngularJS, Foundation, Polymer...)● any W3C-compliant application should work out-of-the-box !● consuming platform APIs should be straightforward & easy !

● For users

● installing, uninstalling, starting, stopping… apps● application privileges rights will be clearly exposed

● Security concerns, for developers & users● privileges need to be enforced at system level

Application development prerequisites

Page 6: Writing secure HTML5 applications for automotive systems€¦ · Feb 2, 2016 2 Writing secure HTML5 applications for automotive Introduction HTML5 application development Modern development

Feb 2, 2016 6

HTML5 application development

● Using modern JavaScript fameworks :● AngularJS [2]

● Foundation [3] ● Polymer [4]

● With a full-fledged IDE :● Eclipse● NetBeans

● with a dev/prod build system :● Gulp [5]

● Grunt [6]

● and an adapted browser :

● Chromium with LiveReload extension [7]

Modern development methods

Page 7: Writing secure HTML5 applications for automotive systems€¦ · Feb 2, 2016 2 Writing secure HTML5 applications for automotive Introduction HTML5 application development Modern development

Feb 2, 2016 7

Template : http://<board>/api/<plugin>/<method>(?value=<var>)

● http://<board>/api/radio/mode?value=FM : select FM mode

● http://<board>/api/radio/freq?value=110.2 : select 110.2 Hz

● demo AM/FM Radio app is written using AngularJS ;

● platform glue is provided in plugins, written in C/C++, JavaScript ;

● developers should be able to write and provide their own plugins...

● … but then, how do we :- package applications ?- enforce security ?

Platform APIs as HTTP RESTHTML5 application development

Page 8: Writing secure HTML5 applications for automotive systems€¦ · Feb 2, 2016 2 Writing secure HTML5 applications for automotive Introduction HTML5 application development Modern development

Feb 2, 2016 8

Demos : HTML5/JS Radio, Annex, Rabbit

HTML5 application development

Page 9: Writing secure HTML5 applications for automotive systems€¦ · Feb 2, 2016 2 Writing secure HTML5 applications for automotive Introduction HTML5 application development Modern development

Feb 2, 2016 9

Application Framework platform design

● Application Framework Manager [8]

- System daemon : installs, uninstalls, list… applications system-wide- User daemon (1 per user) :

● starts, stops, pauses… applications● when a HTML app starts, forks an Application Framework Binder with

plugins & security context related to app category & privileges

● Application Framework Binder [9]

- is a lightweight web server, based on libmicrohttpd [10]

- loads platform plugins :● Audio, AM/FM Radio, Media Server…

- provides platform APIs as HTTP REST APIs

● Web applications are displayed locally or remotely

Application Framework design

Page 10: Writing secure HTML5 applications for automotive systems€¦ · Feb 2, 2016 2 Writing secure HTML5 applications for automotive Introduction HTML5 application development Modern development

Feb 2, 2016 10

Application Framework design

Application Framework platform design

Page 11: Writing secure HTML5 applications for automotive systems€¦ · Feb 2, 2016 2 Writing secure HTML5 applications for automotive Introduction HTML5 application development Modern development

Feb 2, 2016 11

Demo : installing & running applications

● Uploading - Installing● Starting● Stopping

Application Framework platform design

Page 12: Writing secure HTML5 applications for automotive systems€¦ · Feb 2, 2016 2 Writing secure HTML5 applications for automotive Introduction HTML5 application development Modern development

Feb 2, 2016 12

Privilege isolation through SMACK and Cynara

SMACK labels, Cynara policies● SMACK (Simplified Mandatory Access Control Kernel) [11]

● is a LSM (Linux Security Module)(others include : SELinux, AppArmor...)

● associates security labels to files, processes and streams ;● “hard” security (system access denied on resource access)

● Cynara [12]

● stores complex policies in databases ;● “soft” security (access is checked by framework) ;

● Security concerns, for developers & users● SMACK labels are attached to user-level Binder● Cynara is requested by Binder

Page 13: Writing secure HTML5 applications for automotive systems€¦ · Feb 2, 2016 2 Writing secure HTML5 applications for automotive Introduction HTML5 application development Modern development

Feb 2, 2016 13

Privilege isolation through SMACK and Cynara

Security for Application Framework Binder

Page 14: Writing secure HTML5 applications for automotive systems€¦ · Feb 2, 2016 2 Writing secure HTML5 applications for automotive Introduction HTML5 application development Modern development

Feb 2, 2016 14

Demo : exploitation attempt

Privilege isolation through SMACK and Cynara

Page 15: Writing secure HTML5 applications for automotive systems€¦ · Feb 2, 2016 2 Writing secure HTML5 applications for automotive Introduction HTML5 application development Modern development

Feb 2, 2016 15

Annex

Annex

Page 16: Writing secure HTML5 applications for automotive systems€¦ · Feb 2, 2016 2 Writing secure HTML5 applications for automotive Introduction HTML5 application development Modern development

Feb 2, 2016 16

Links [1] HTTP REST : https://en.wikipedia.org/wiki/Representational_state_transfer[2] AngularJS : https://angularjs.org/[3] Foundation : http://foundation.zurb.com[4] Polymer : https://www.polymer-project.org/[5] Gulp : http://gulpjs.com/[6] Grunt : http://gruntjs.com/[7] LiveReload for Chromium : https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei

[8] Application Framework Manager : https://github.com/iotbzh/afm-main[9] Application Fraemwork Binder : https://github.com/iotbzh/afb-daemon[10] libmicrohttpd : https://www.gnu.org/software/libmicrohttpd/[11] SMACK : http://schaufler-ca.com/[12] Cynara : https://github.com/Samsung/cynara

Page 17: Writing secure HTML5 applications for automotive systems€¦ · Feb 2, 2016 2 Writing secure HTML5 applications for automotive Introduction HTML5 application development Modern development

Feb 2, 2016 17

Questions & Answers

Q&A

Page 18: Writing secure HTML5 applications for automotive systems€¦ · Feb 2, 2016 2 Writing secure HTML5 applications for automotive Introduction HTML5 application development Modern development

Feb 2, 2016 18

That's All Folks !