SlideShare a Scribd company logo
SVMP: Secure Virtual
Mobile Platform
Yu-Hsin Hung
Introduction
• https://svmp.github.io
• Configuration: x86 Android VMs on x86 server
• VM Platform: support KVM, VirtualBox, VMware…
• Cloud Controller: support OpenStack, Amazon EC2…
• Remote Protocol: WebRTC + SVMP Wire Protocol
• Client: Android/iOS app
• Storage (user data) is separated from VM
Components
• Client Application: an unprivileged Android/iOS application with WebRTC
peer connection and SVMP protocol messages, similar to clients for VNC
and RDP
• SVMP Overseer: receive login request, perform authentication, and
manage VMs on the cloud
• SVMP Server: routing input message from client connections to SVMP
daemons running inside virtual devices
• SVMP daemon: primary entry point of client user input to the virtual device
• Virtual Device: Virtual Device Image (SVMP Gold Image) + User Data
Volume
• Cloud Controller: support OpenStack, Amazon EC2…
Architecture
Virtual Device Structure
• The central SVMP daemon
• Touch-screen input injection
• Virtual sensors
• Location update pub/sub
• Notification and Intent forwarding and re-broadcast
• Virtual frame buffer, video encoding, and streaming
Virtual Device Structure
SVMP Wire Protocol
• SVMP/svmp-protocol-def repository
• Request: client->server
• Response: server->client
• JSON Payload: a type attribute and up to one optional
attribute associated with that subtype, e.g.
{“type”:”ROTATIONINFO”,”rotationInfo":{"rotation":0}}
• Protocol Buffers: protocols are defined using “Protocol
Buffers” - Google's data interchange format, and Java
class definitions are generated by protocol buffer compiler
SVMP daemon
• SVMP/android_external_svmp_eventserver repository
• An user-level Android background service, launched when
BroadcastReceiver catches BOOT_COMPLETED Intent
• EventServer: many handlers to handle different events (touch,
sensor, notification…)
• LogHandler: logcat message forwarding
• DatabaseHandler: GPS location service subscription
• WifiSpoofer: spoof that Wi-Fi connection is active
• details in next few pages…
SVMP daemon
• proxy socket: a Java server socket to listen events from client
• sensor socket: initialized in init.rc as /dev/socket/svmp_sensors
• Handlers:
• SensorHandler
• LocationHandler
• IntentHandler
• NotificationHandler
• KeyHandler
• ConfigHandler: only keyboard configurations
• LauncherHandler: for single app mode
Touch&screen injection
• EventServer.java
• SCREENINFO packet: sync screen resolution
• TOUCHEVENT packet: translate coordinates X, Y
and inject by Android InputManager (native support)
• ROTATION_INFO packet: rotation info is injected by
sending custom broadcast
ROTATION_CHANGED_ACTION, received by
modified framework
IntentHandler
• IntentHandler.java
• Android Intent: an abstract description of an operation to
be performed
• Currently support two kinds of intent forwarding
• outgoing call: forward ACTION_NEW_OUTGOING_CALL
from server to client and dial using client’s SIM card
• activity action: forward ACTION_VIEW from client to
server and open URL inside the VM
LocationHandler
• LocationHandler.java
• Android natively support mocked location
• Catch custom Intent LOCATION_SUBSCRIBE_ACTION
(sent by modified framework) and forward location request
to client
• Maintain location subscription in DatabaseHandler (single-
shot or not)
• Inject client’s GPS location to VM by spoofing test provider
LocationManager.setTestProviderLocation()
NotificationHandler
• NotificationHandler.java
• catch custom Intent
INTERCEPT_NOTIFICATION_ACTION
• use Java Reflection to extract text elements and
icons from RemoteViews and forward notification to
client
SensorHandler
• BaseServer.java
• SENSOREVENT packet: forwarded to /dev/socket/
svmp_sensors socket
• Client keep listening to all the available sensors
• Use delay time mechanism to prevent spammy sensor
messages
• SVMP HAL module libsensors listens on the svmp_sensors
socket then processes the actual sensor events, the HAL
interfaces are defined in AOSP hardware/sensors.h
Android client
• WebRTC: video & audio streaming
• Corresponding handlers to deal with SVMP daemon
• TouchHandler
• RotationHandler
• KeyHandler
• ConfigHandler
• NotificationHandler
• SensorHandler
• …
Android Framework
modification
• InputManagerService.java
• Natively support injecting key events (KeyHandler.java in
SVMP daemon)
• Create a BroadcastReceiver to listen custom intent for hard
keyboard, attach two virtual keyboards when hard keyboard
attached to client
• NotificationManager.java
• Intercept notification by preventing enqueue it and send a
INTERCEPT_NOTIFICATION broadcast, caught by SVMP
daemon
Android Framework
modification
• WindowOrientationListener.java
• Create a BroadcastReceiver to listen custom
ROTATION_CHANGED intent and inject the
rotation info
• LocationManager.java
• Intercept location request and send a
LOCATION_SUBSCRIBE_ACTION broadcast,
caught by SVMP daemon then redirected to client
Android System Core
modification
• BatteryMonitor.cpp
• Battery injection
• Battery status is always charging
• Battery health is always good
• Battery level is always 100%
Android Device Driver
• Lots of things, still tracing…
• Virtual Frame Buffer
• VM write frame to VFB device instead of real video device
• Android surfaceflinger library generates a VSYNC event when
writing
• When VSYNC event occurs, each frame is fed into the WebRTC
subsystem
• Virtual Sensors: libsensors/sensors.cpp
• Re-implement the interface defined by AOSP

More Related Content

PDF
Nokia Qt SDK in action - Qt developer days 2010
PPTX
Real time websites and mobile apps with SignalR
PDF
Iñaki Baz - CommCon 2018 | Building multy-party video apps with mediasoup
PPTX
signalr
PPTX
Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.js
PDF
FRED: A Hosted Data Flow Platform for the IoT
PPTX
Realtime web experience with signalR
PPTX
Supporting Hyper-V 3.0 on Apache CloudStack
Nokia Qt SDK in action - Qt developer days 2010
Real time websites and mobile apps with SignalR
Iñaki Baz - CommCon 2018 | Building multy-party video apps with mediasoup
signalr
Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.js
FRED: A Hosted Data Flow Platform for the IoT
Realtime web experience with signalR
Supporting Hyper-V 3.0 on Apache CloudStack

Similar to Project meeting: SVMP - Secure Virtual Mobile Platform (20)

PDF
Docker's Killer Feature: The Remote API
PPTX
ASP.NET MVC 5 and SignalR 2
PPTX
Real time Communication with Signalr (Android Client)
PDF
Actors or Not: Async Event Architectures
PPTX
virtualization basic hypervisor vmm.pptx
PPTX
Ovations AWS pop-up loft 2019 Technical presentation
PDF
Terence Barr - beyond smartphones - 24mai2011
PPT
Under The Hood
PPTX
SignalR powered real-time x-plat mobile apps!
PPTX
20150531 virtualizatino station 2.0 partner's day
PPTX
Virtualization, A Concept Implementation of Cloud
PPTX
Realtime Messaging und verteilte Systeme mit SharePoint und Windows Azure Ser...
PPT
DOC-20250426-WA0035hjdydhhrhhehrhhrh..ppt
KEY
20120306 dublin js
PPTX
Secure Multi Tenant Cloud with OpenContrail
PDF
Xtopia2010 wp7
PPTX
Developing for Chromecast on Android
PDF
Wcf Overview
PDF
Modern Cloud-Native Streaming Platforms: Event Streaming Microservices with K...
PPT
Wifi direct p2p app
Docker's Killer Feature: The Remote API
ASP.NET MVC 5 and SignalR 2
Real time Communication with Signalr (Android Client)
Actors or Not: Async Event Architectures
virtualization basic hypervisor vmm.pptx
Ovations AWS pop-up loft 2019 Technical presentation
Terence Barr - beyond smartphones - 24mai2011
Under The Hood
SignalR powered real-time x-plat mobile apps!
20150531 virtualizatino station 2.0 partner's day
Virtualization, A Concept Implementation of Cloud
Realtime Messaging und verteilte Systeme mit SharePoint und Windows Azure Ser...
DOC-20250426-WA0035hjdydhhrhhehrhhrh..ppt
20120306 dublin js
Secure Multi Tenant Cloud with OpenContrail
Xtopia2010 wp7
Developing for Chromecast on Android
Wcf Overview
Modern Cloud-Native Streaming Platforms: Event Streaming Microservices with K...
Wifi direct p2p app
Ad

More from Yu-Hsin Hung (8)

PDF
IoT/M2M Security
PDF
Android Binder IPC for Linux
PDF
Project meeting: Android Graphics Architecture Overview
PDF
Group meeting: UniSan - Proactive Kernel Memory Initialization to Eliminate D...
PDF
Group meeting: TaintPipe - Pipelined Symbolic Taint Analysis
PDF
Group meeting: Polaris - Faster Page Loads Using Fine-grained Dependency Trac...
PDF
Group meeting: Identifying Information Disclosure in Web Applications with Re...
PDF
DockerVC Hackathon Presentation
IoT/M2M Security
Android Binder IPC for Linux
Project meeting: Android Graphics Architecture Overview
Group meeting: UniSan - Proactive Kernel Memory Initialization to Eliminate D...
Group meeting: TaintPipe - Pipelined Symbolic Taint Analysis
Group meeting: Polaris - Faster Page Loads Using Fine-grained Dependency Trac...
Group meeting: Identifying Information Disclosure in Web Applications with Re...
DockerVC Hackathon Presentation
Ad

Recently uploaded (20)

PPTX
Online Work Permit System for Fast Permit Processing
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
AI in Product Development-omnex systems
PDF
medical staffing services at VALiNTRY
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
System and Network Administration Chapter 2
PDF
Nekopoi APK 2025 free lastest update
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Digital Strategies for Manufacturing Companies
PPTX
Transform Your Business with a Software ERP System
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
Softaken Excel to vCard Converter Software.pdf
Online Work Permit System for Fast Permit Processing
Design an Analysis of Algorithms I-SECS-1021-03
AI in Product Development-omnex systems
medical staffing services at VALiNTRY
CHAPTER 2 - PM Management and IT Context
How Creative Agencies Leverage Project Management Software.pdf
System and Network Administration Chapter 2
Nekopoi APK 2025 free lastest update
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
2025 Textile ERP Trends: SAP, Odoo & Oracle
Digital Strategies for Manufacturing Companies
Transform Your Business with a Software ERP System
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Navsoft: AI-Powered Business Solutions & Custom Software Development
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Adobe Illustrator 28.6 Crack My Vision of Vector Design
ISO 45001 Occupational Health and Safety Management System
Softaken Excel to vCard Converter Software.pdf

Project meeting: SVMP - Secure Virtual Mobile Platform

  • 1. SVMP: Secure Virtual Mobile Platform Yu-Hsin Hung
  • 2. Introduction • https://svmp.github.io • Configuration: x86 Android VMs on x86 server • VM Platform: support KVM, VirtualBox, VMware… • Cloud Controller: support OpenStack, Amazon EC2… • Remote Protocol: WebRTC + SVMP Wire Protocol • Client: Android/iOS app • Storage (user data) is separated from VM
  • 3. Components • Client Application: an unprivileged Android/iOS application with WebRTC peer connection and SVMP protocol messages, similar to clients for VNC and RDP • SVMP Overseer: receive login request, perform authentication, and manage VMs on the cloud • SVMP Server: routing input message from client connections to SVMP daemons running inside virtual devices • SVMP daemon: primary entry point of client user input to the virtual device • Virtual Device: Virtual Device Image (SVMP Gold Image) + User Data Volume • Cloud Controller: support OpenStack, Amazon EC2…
  • 5. Virtual Device Structure • The central SVMP daemon • Touch-screen input injection • Virtual sensors • Location update pub/sub • Notification and Intent forwarding and re-broadcast • Virtual frame buffer, video encoding, and streaming
  • 7. SVMP Wire Protocol • SVMP/svmp-protocol-def repository • Request: client->server • Response: server->client • JSON Payload: a type attribute and up to one optional attribute associated with that subtype, e.g. {“type”:”ROTATIONINFO”,”rotationInfo":{"rotation":0}} • Protocol Buffers: protocols are defined using “Protocol Buffers” - Google's data interchange format, and Java class definitions are generated by protocol buffer compiler
  • 8. SVMP daemon • SVMP/android_external_svmp_eventserver repository • An user-level Android background service, launched when BroadcastReceiver catches BOOT_COMPLETED Intent • EventServer: many handlers to handle different events (touch, sensor, notification…) • LogHandler: logcat message forwarding • DatabaseHandler: GPS location service subscription • WifiSpoofer: spoof that Wi-Fi connection is active • details in next few pages…
  • 9. SVMP daemon • proxy socket: a Java server socket to listen events from client • sensor socket: initialized in init.rc as /dev/socket/svmp_sensors • Handlers: • SensorHandler • LocationHandler • IntentHandler • NotificationHandler • KeyHandler • ConfigHandler: only keyboard configurations • LauncherHandler: for single app mode
  • 10. Touch&screen injection • EventServer.java • SCREENINFO packet: sync screen resolution • TOUCHEVENT packet: translate coordinates X, Y and inject by Android InputManager (native support) • ROTATION_INFO packet: rotation info is injected by sending custom broadcast ROTATION_CHANGED_ACTION, received by modified framework
  • 11. IntentHandler • IntentHandler.java • Android Intent: an abstract description of an operation to be performed • Currently support two kinds of intent forwarding • outgoing call: forward ACTION_NEW_OUTGOING_CALL from server to client and dial using client’s SIM card • activity action: forward ACTION_VIEW from client to server and open URL inside the VM
  • 12. LocationHandler • LocationHandler.java • Android natively support mocked location • Catch custom Intent LOCATION_SUBSCRIBE_ACTION (sent by modified framework) and forward location request to client • Maintain location subscription in DatabaseHandler (single- shot or not) • Inject client’s GPS location to VM by spoofing test provider LocationManager.setTestProviderLocation()
  • 13. NotificationHandler • NotificationHandler.java • catch custom Intent INTERCEPT_NOTIFICATION_ACTION • use Java Reflection to extract text elements and icons from RemoteViews and forward notification to client
  • 14. SensorHandler • BaseServer.java • SENSOREVENT packet: forwarded to /dev/socket/ svmp_sensors socket • Client keep listening to all the available sensors • Use delay time mechanism to prevent spammy sensor messages • SVMP HAL module libsensors listens on the svmp_sensors socket then processes the actual sensor events, the HAL interfaces are defined in AOSP hardware/sensors.h
  • 15. Android client • WebRTC: video & audio streaming • Corresponding handlers to deal with SVMP daemon • TouchHandler • RotationHandler • KeyHandler • ConfigHandler • NotificationHandler • SensorHandler • …
  • 16. Android Framework modification • InputManagerService.java • Natively support injecting key events (KeyHandler.java in SVMP daemon) • Create a BroadcastReceiver to listen custom intent for hard keyboard, attach two virtual keyboards when hard keyboard attached to client • NotificationManager.java • Intercept notification by preventing enqueue it and send a INTERCEPT_NOTIFICATION broadcast, caught by SVMP daemon
  • 17. Android Framework modification • WindowOrientationListener.java • Create a BroadcastReceiver to listen custom ROTATION_CHANGED intent and inject the rotation info • LocationManager.java • Intercept location request and send a LOCATION_SUBSCRIBE_ACTION broadcast, caught by SVMP daemon then redirected to client
  • 18. Android System Core modification • BatteryMonitor.cpp • Battery injection • Battery status is always charging • Battery health is always good • Battery level is always 100%
  • 19. Android Device Driver • Lots of things, still tracing… • Virtual Frame Buffer • VM write frame to VFB device instead of real video device • Android surfaceflinger library generates a VSYNC event when writing • When VSYNC event occurs, each frame is fed into the WebRTC subsystem • Virtual Sensors: libsensors/sensors.cpp • Re-implement the interface defined by AOSP