Creating secure web based user interfaces for Embedded Devices



Similar documents
Developing ASP.NET MVC 4 Web Applications

Internet Banking System Web Application Penetration Test Report

Developing ASP.NET MVC 4 Web Applications MOC 20486

Building native mobile apps for Digital Factory

Developing ASP.NET MVC 4 Web Applications Course 20486A; 5 Days, Instructor-led

Hack Proof Your Webapps

A Tool for Evaluation and Optimization of Web Application Performance

Table of contents. HTML5 Data Bindings SEO DMXzone

Web Browsing Examples. How Web Browsing and HTTP Works

(WAPT) Web Application Penetration Testing

Portals and Hosted Files

Introduction to the. Barracuda Embedded Web-Server

Out of the Fire - Adding Layers of Protection When Deploying Oracle EBS to the Internet

Web Server Manual. Mike Burns Greg Pettyjohn Jay McCarthy November 20, 2006

General principles and architecture of Adlib and Adlib API. Petra Otten Manager Customer Support

Lecture 11 Web Application Security (part 1)

Abstract. 1. Introduction

COMP 112 Assignment 1: HTTP Servers

Securing ios Applications. Dr. Bruce Sams, OPTIMAbit GmbH

1. Introduction. 2. Web Application. 3. Components. 4. Common Vulnerabilities. 5. Improving security in Web applications

Criteria for web application security check. Version

Last Updated: July STATISTICA Enterprise Server Security

Implementing Mobile Thin client Architecture For Enterprise Application

An introduction to creating Web 2.0 applications in Rational Application Developer Version 8.0

CIA Lab Assignment: Web Servers

Top Ten Web Attacks. Saumil Shah Net-Square. BlackHat Asia 2002, Singapore

Perceptive Experience Single Sign-On Solutions

Programming Flaws and How to Fix Them

A Server and Browser-Transparent CSRF Defense for Web 2.0 Applications. Slides by Connor Schnaith

Network Management Card Security Implementation

Table of Contents. Chapter 1: Installing Endpoint Application Control. Chapter 2: Getting Support. Index

Last update: February 23, 2004

M3-R3: INTERNET AND WEB DESIGN

EECS 398 Project 2: Classic Web Vulnerabilities

Chapter 17. Transport-Level Security

Make a folder named Lab3. We will be using Unix redirection commands to create several output files in that folder.

If your organization is not already

Eucalyptus User Console Guide

Web Application Report

Web Hosting. Comprehensive, scalable solutions for hosting dynamic websites, secure web services, and enterprise applications.

Yusof Al-Wadei Page 1 of 9. Interactive Web Design through Survey and Adoption of Modern Web-Technologies Yusof Hussein Al-Wadei

Project Report on Implementation and Testing of an HTTP/1.0 Webserver

elearning for Secure Application Development

Executive Summary On IronWASP

OAuth 2.0 Developers Guide. Ping Identity, Inc th Street, Suite 100, Denver, CO

Network Technologies

SAMSUNG SMARTTV: HOW-TO TO CREATING INSECURE DEVICE IN TODAY S WORLD. Sergey Belov

Google Web Toolkit. Introduction to GWT Development. Ilkka Rinne & Sampo Savolainen / Spatineo Oy

Project 2: Web Security Pitfalls

Connection Broker Managing User Connections to Workstations and Blades, OpenStack Clouds, VDI, and more. Security Review

FIVE SIGNS YOU NEED HTML5 WEBSOCKETS

External Vulnerability Assessment. -Technical Summary- ABC ORGANIZATION

Barracuda Embedded Web-Server whitepapers

MatriXay WEB Application Vulnerability Scanner V Overview. (DAS- WEBScan ) The best WEB application assessment tool

The Top Web Application Attacks: Are you vulnerable?

Leveraging Cloud Storage Through Mobile Applications Using Mezeo Cloud Storage Platform REST API. John Eastman Mezeo

Accelerating Rails with

SSL implementieren aber sicher!

Integrating Web Application Security into the IT Curriculum

Getting Started Guide for Developing tibbr Apps

THE OPEN UNIVERSITY OF TANZANIA

Access Gateway Guide Access Manager 4.0 SP1


Modern Web Development From Angle Brackets to Web Sockets

T320 E-business technologies: foundations and practice

WebNow Single Sign-On Solutions

Axway API Gateway. Version 7.4.1

Proto Balance SSL TLS Off-Loading, Load Balancing. User Manual - SSL.


Introduction to Computer Security

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

Serving dynamic webpages in less than a millisecond

Web applications. Web security: web basics. HTTP requests. URLs. GET request. Myrto Arapinis School of Informatics University of Edinburgh

Gateway Apps - Security Summary SECURITY SUMMARY

Connection Broker Managing User Connections to Workstations, Blades, VDI, and more. Security Review

Contents. This document contains the following sections:

All Your Mobile Applications Are Belong To Us

Sysax Multi Server User manual

The purpose of this report is to educate our prospective clients about capabilities of Hackers Locked.

Novell Access Manager

Programming in HTML5 with JavaScript and CSS3

ECE 4893: Internetwork Security Lab 12: Web Security

FINAL DoIT v.8 APPLICATION SECURITY PROCEDURE

WebView addjavascriptinterface Remote Code Execution 23/09/2013

XML Processing and Web Services. Chapter 17

WEB DATABASE PUBLISHING

HtmlUnit: An Efficient Approach to Testing Web Applications

Lotus Domino Security

Credits: Some of the slides are based on material adapted from

Apache Usage. Apache is used to serve static and dynamic content

Web Application Hacking (Penetration Testing) 5-day Hands-On Course

DISCOVERY OF WEB-APPLICATION VULNERABILITIES USING FUZZING TECHNIQUES

Installation Guide. 1 Pre-installation Checks 2 Installation 3 After Installation 4 Uninstallation 5 Appendix

Development Techniques for Native/Hybrid Tizen Apps. Presented by Kirill Kruchinkin

Experian Secure Transport Service

White Paper On. Single Page Application. Presented by: Yatin Patel

WHITE PAPER. Domo Advanced Architecture

PostgreSQL Backup Strategies

QualysGuard WAS. Getting Started Guide Version 3.3. March 21, 2014

RPC and TI-RPC Test Suite Test Plan Document

Transcription:

Creating secure web based user interfaces for Embedded Devices 2011 Essensium N.V. This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License

How do you talk to an embedded system??

Web interface is the easiest! Custom display RS232 Shell Ssh Custom protocol HTTP

Creating secure web based user interfaces for Embedded Devices arnout@mind.be

Overview 1 Why web-based user interfaces? 2 Adding an HTTP server to firmware 3 Security considerations 4 Using a browser as the UI

Traditional firmware architecture ttys0 ttys1 ssh I/O thread I/O thread custom_sh I/O thread Main application thread

Adding a web interface to traditional firmware architecture ttys0 ttys1 ssh apache connector CGI/php I/O thread I/O thread I/O thread I/O thread Main application thread

Benefits of a web interface Browsers are universal availability familiarity The network is everywhere Browsers allow a rich interface A web-interface is the cheapest interface only software (and a network connection)

Adding a web interface to traditional firmware architecture has many problems ttys0 ttys1 ssh apache Extra processes I/O thread I/O thread connector Requires RPC mechanism I/O thread Inconsistent interfaces (HTML/Text) Extra footprint from web server Main application thread CGI/php I/O thread

Web interface architecture: embedded ttys0 ttys1 ssh HTTP client I/O thread I/O thread connector I/O thread Embedded web server thread Main application thread

Web interface architecture: embedded and no other interfaces HTTP client HTTP client HTTP client... Embedded web server thread HTML formatter Main application thread

Web interface architecture: embedded and no other interfaces HTTP client HTTP client HTTP client... Embedded web server thread No extra processes needed Only one type of interface Stay within your application language HTML formatter Main application thread

The embedded web server HTTP client HTTP client HTTP client... Embedded web server thread HTML formatter Main application thread

Tasks of the embedded web server Listen & accept connections Parse HTTP request (GET/POST/PUT/...) Parse HTTP headers Parse URI and find a handler for it Serve static pages directly from filesystem Provide MIME-type for static pages Serve dynamic pages by calling a handler function

Mongoose as an embedded web server 40 Kilobytes License: MIT/X11 (BSD like) Small, easy to hack Actively developed Multiplatform (Posix, RTEMS, Windows (mingw/msvc)) Unit tests SSI (Server Side Includes), Directory listing,... CGI calls HTTP Authenticate:, Range:, Etag:, SSL (see later) http://code.google.com/p/mongoose/

Code example ctx = mg_start(&event_handler, NULL, options);... mg_stop(ctx); static void *event_handler(enum mg_event event, struct mg_connection *conn, const struct mg_request_info *request_info) { if (event == MG_NEW_REQUEST) { if (!request_info->is_ssl) { return redirect_to_ssl(conn, request_info); } else if (!is_authorized(conn, request_info)) { return redirect_to_login(conn, request_info); } else if (strcmp(request_info->uri, "/get_messages") == 0) { return ajax_get_messages(conn, request_info); } return NULL; }

Mongoose limitations Not used very heavily limited testing Not a lot of API for embedded handlers e.g. generate standard headers e.g. calculate Etag: etc. No IPv6 support (yet) Still very young API subject to change Will it survive? Contributions very welcome!

Alternatives Klone http://www.koanlogic.com/klone/ GPL/Commercial PHP-like embedding of C/C++ Slightly larger (?); certainly more complex IPv6 support libwthttpd (see later) Non-embedded Apache Lighttpd Monkey...

HTTP security HTTP client HTTP client HTTP client... Embedded web server thread HTML formatter Main application thread

HTTP security Web based embedded system is vulnerable Port 80 is attacked Anybody can try to connect Text based communication buffer overflows Authentication password sniffing Request forgery and replay attacks

Tips to protect the web service Time out connections otherwise you run out of threads HTTP Digest Authentication otherwise passwords can be sniffed URL-encoding of session Always use a different URL If bookmarked redirect to login page first SSL/TLS

Comparison of SSL libraries GnuTLS License: LGPL Pretty complete OpenSSL License: BSD with advertising clause Most well-known Large and clumsy CyaSSL License: GPL/Commercial Specifically targeted at embedded focuses on most used features Optimized for speed (e.g. assembly for embedded ups) OpenSSL API (simplified)

Comparison of SSL libraries: Protocol support and library size SSLv2 SSLv3 TLSv1.0 TLSv1.1 TLSv1.2 GnuTLS No Yes Yes Yes Yes OpenSSL Yes Yes Yes No No CyaSSL No Yes Yes Yes Yes Debian x86 OpenWrt MIPS GnuTLS 944K 323K OpenSSL 1649K 506K CyaSSL 90K 60K

Certificate management

Certificate management Root CA Production CA Device certificate

Generating HTML content HTTP client HTTP client HTTP client... Embedded web server thread HTML formatter Main application thread

Generating HTML content Status pages AJAX or long polling to refresh it Forms to manipulate settings CSS to make it look nice Javascript (JQuery) to pre-verify constraints Graphical output Image maps HTML5 canvas Javascript plotting Internationalization: serve pages in the user's language Accept-Language Translations

Cross-browser compatibility 29

Libraries for cross-browser compatibility Jquery http://jquery.com/ 30K License: MIT The standard on the web Still need to write a lot of Javascript doesn't solve all cross-browser issues Wt http://www.webtoolkit.eu/wt C++ UI library 2MB (incl. Webserver) License: GPL/Commercial Stay within 1 programming language no javascript required 30

Wt is a UI library for web applications 31

Conclusions Web interface is the cheapest UI for embedded systems Embed it directly into your application mongoose, klone, libwthttp Don't forget about security Cross-browser support is difficult use jquery or Wt 32

www.mind.be www.essensium.com Essensium NV Mind - Embedded Software Division Gaston Geenslaan 9, B-3001 Leuven Tel : +32 16-28 65 00 Fax : +32 16-28 65 01 email : info@essensium.com