SlideShare a Scribd company logo
Client Virtualization Toolstack in Go
Nicholas Rosbrook, Software Engineer, Assured Information Security
Brendan Kerrigan, Principal Software Engineer, Assured Information Security
Overview
• Introduction
• Motivation
• Evaluation
• Redfield and redctl
• Libxl Go (Golang) bindings
• Questions
Introduction
• Brendan Kerrigan – Principal Engineer at Assured Information
Security, Inc.
• Hypervisors
• Graphics virtualization
• Embedded
• Nicholas Rosbrook – Software Engineer at Assured Information
Security, Inc.
• Cryptography
• VPNs and Networking
• Go expert
Motivation
• We do a lot of client virtualization work
• Utilizing hypervisors to do end point security
• Mostly OpenXT based products now
• OpenXT isn’t the easiest project to work on (10 years of development
means there are lots of components)
• Sometimes key high-security features can be a hindrance to some use
cases
• Client virtualization is pretty different than server virtualization
• Especially when it comes to toolstacks
Evaluation
• What’s out there we can leverage?
• XenMgr
• Libvirt (+ qubectl)
• What if we had a clean slate?
XenMgr
• XenMgr is high friction
• Haskell
• Esoteric
• Tough to find developers
• Lots of legacy interfaces that are unexercised and unaudited (audit in
progress)
• A lot of cryptic code that essentially reads a database and writes an xl
config and calls exec/fork
• Local and remote APIs are different 
• The command line tool is great
Libvirt
• One layer of abstraction too many
• XML domain configurations are too complex
• Designed to work with several virtualization technologies – KVM, Xen,
LXC, etc.
• We want to work with Xen and do it well
• Does a lot more than we need it to
• There is an existing Go package (developed by DigitalOcean)
redctl
• Introducing redctl, the client toolstack to our Xen
distribution, Redfield
• The good:
• A client toolstack where remote and local management
APIs are unified
• Utilize gRPC
• Don’t dictate transport (IPv4, IPv6, PV channels, Argo, vsock)
• Easy to understand and test language (Go)
• Make the command line tool awesome (like XenMgr’s)
• The bad:
• Still doing exec/fork a lot when dealing with libxl…
What is cgo?
• Cgo enables Go programs to call C code through a pseudo-
package, “C”
• Allows access of C types, variables, and functions
• E.g. C.size_t, C.stdout, C.printf
• The “preamble”
• A block comment used to include headers, set CFLAGS, LDFLAGS, etc.
• Immediately precedes the import “C” statement
What is cgo?
What is cgo?
• C fields that cannot be expressed in Go are omitted
• The C type void* is represented by Go’s unsafe.Pointer
• Cannot call C function pointers from Go
• There are some restrictions on passing pointers between C and Go
Writing a Go Package for libxl
• Writing the cgo code by hand is tedious
• Cgo is simple enough to make code generation easy
• We use c-for-go: https://github.com/xlab/c-for-go
• Define translation and generation rules with a YAML configuration file
• Accept or ignore symbols, rename variables, apply rules to a given scope,
and more
Writing a Go Package for libxl
Writing a Go Package for libxl
• Finally, we need some wrappers…
Writing a Go Package for libxl
• Instead of:
Writing a Go Package for libxl
• We want:
Future Work
• Continue writing wrappers
• Trim the size of the package
• Integrate into redctl
• Upstream
• Current fork: https://github.com/enr0n/xen/tree/libxl-go
Questions?
• https://ainfosec.com
• https://gitlab.com/redfield
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerrigan, Assured Information Security, Inc.

More Related Content

PDF
Platform Security Summit 18: Xen Security Weather Report 2018
PDF
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
PPTX
OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
PDF
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
PDF
XPDDS18: Xen Project Weather Report 2018
PDF
XDF18: Heterogeneous Real-Time SoC Software Architecture - Stefano Stabellini...
PDF
XPDDS19 Keynote: Unikraft Weather Report
PDF
Unikraft Landing Page Master Slides
Platform Security Summit 18: Xen Security Weather Report 2018
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
XPDDS18: Xen Project Weather Report 2018
XDF18: Heterogeneous Real-Time SoC Software Architecture - Stefano Stabellini...
XPDDS19 Keynote: Unikraft Weather Report
Unikraft Landing Page Master Slides

What's hot (20)

PDF
Fosdem 18: Securing embedded Systems using Virtualization
PDF
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
PDF
OSSA17 - Live patch, VMI, Security Mgmt (50 mins, no embedded demos)
PPTX
Scale17x: Thinking outside of the conceived tech comfort zone
PDF
Xen Project 15 Years down the Line
PPTX
OSSEU17: How Open Source Project Xen Puts Security Software Vendors Ahead of ...
PDF
OSSEU18: NVDIMM and Virtualization - George Dunlap, Citrix
PDF
XPDDS19: Xen API Archaeology: Creating a Full-Featured VMI Debugger for the...
PDF
XPDDS17: Hypervisor-Based Security: Bringing Virtualized Exceptions Into the ...
PDF
2018 Genivi Xen Overview Nov Update
PPTX
ALSS14: Xen Project Automotive Hypervisor (Demo)
PDF
XPDS16: A Paravirtualized Interface for Socket Syscalls - Dimitri Stiliadis, ...
PDF
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
PPTX
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
PDF
XPDDS19: Using Xen to Enable an Open Source Safety Certifiable Automotive Gra...
PDF
OSSA17 - Mixed License FOSS Projects
PPTX
XPDDS18: Design Session - SGX deep dive and SGX Virtualization Discussion, Ka...
PDF
OSSEU18: From Handcraft to Unikraft: Simpler Unikernelization of Your Applica...
PDF
Scale 12x Securing Your Cloud with The Xen Hypervisor
PDF
XPDDS18: Unikraft: An easy way of crafting Unikernels on Arm - Kaly Xin, ARM
Fosdem 18: Securing embedded Systems using Virtualization
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
OSSA17 - Live patch, VMI, Security Mgmt (50 mins, no embedded demos)
Scale17x: Thinking outside of the conceived tech comfort zone
Xen Project 15 Years down the Line
OSSEU17: How Open Source Project Xen Puts Security Software Vendors Ahead of ...
OSSEU18: NVDIMM and Virtualization - George Dunlap, Citrix
XPDDS19: Xen API Archaeology: Creating a Full-Featured VMI Debugger for the...
XPDDS17: Hypervisor-Based Security: Bringing Virtualized Exceptions Into the ...
2018 Genivi Xen Overview Nov Update
ALSS14: Xen Project Automotive Hypervisor (Demo)
XPDS16: A Paravirtualized Interface for Socket Syscalls - Dimitri Stiliadis, ...
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
XPDDS19: Using Xen to Enable an Open Source Safety Certifiable Automotive Gra...
OSSA17 - Mixed License FOSS Projects
XPDDS18: Design Session - SGX deep dive and SGX Virtualization Discussion, Ka...
OSSEU18: From Handcraft to Unikraft: Simpler Unikernelization of Your Applica...
Scale 12x Securing Your Cloud with The Xen Hypervisor
XPDDS18: Unikraft: An easy way of crafting Unikernels on Arm - Kaly Xin, ARM
Ad

Similar to XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerrigan, Assured Information Security, Inc. (20)

PDF
DevOpsCon 2015 - DevOps in Mobile Games
PDF
CrikeyCon 2015 - iOS Runtime Hacking Crash Course
PPTX
Security research over Windows #defcon china
PDF
Wahckon[2] - iOS Runtime Hacking Crash Course
PDF
cadec-2017-golang
PDF
Forge - DevCon 2016: Implementing Rich Applications in the Browser
PDF
13 practical tips for writing secure golang applications
PPTX
Delivering Developer Tools at Scale
PPTX
Gocd – Kubernetes/Nomad Continuous Deployment
PDF
JavaZone 2017 - Microservices in action at the Dutch National Police
PDF
OpenValue meetup October 2017 - Microservices in action at the Dutch National...
PDF
Microservices in action at the Dutch National Police
PPTX
Developing a mobile cross-platform library
PDF
A Tail of Two Containers: How docker made ci great again
PDF
Microservices in action at the Dutch National Police - Bert Jan Schrijver - C...
PDF
CodeMotion Amsterdam 2018 - Microservices in action at the Dutch National Police
PDF
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
PDF
Everything-as-code - A polyglot adventure
PDF
Everything-as-code. A polyglot adventure. #DevoxxPL
PDF
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
DevOpsCon 2015 - DevOps in Mobile Games
CrikeyCon 2015 - iOS Runtime Hacking Crash Course
Security research over Windows #defcon china
Wahckon[2] - iOS Runtime Hacking Crash Course
cadec-2017-golang
Forge - DevCon 2016: Implementing Rich Applications in the Browser
13 practical tips for writing secure golang applications
Delivering Developer Tools at Scale
Gocd – Kubernetes/Nomad Continuous Deployment
JavaZone 2017 - Microservices in action at the Dutch National Police
OpenValue meetup October 2017 - Microservices in action at the Dutch National...
Microservices in action at the Dutch National Police
Developing a mobile cross-platform library
A Tail of Two Containers: How docker made ci great again
Microservices in action at the Dutch National Police - Bert Jan Schrijver - C...
CodeMotion Amsterdam 2018 - Microservices in action at the Dutch National Police
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Everything-as-code - A polyglot adventure
Everything-as-code. A polyglot adventure. #DevoxxPL
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
Ad

More from The Linux Foundation (20)

PDF
ELC2019: Static Partitioning Made Simple
PDF
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
PDF
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
PDF
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
PDF
XPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
PDF
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
PDF
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
PDF
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
PDF
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
PDF
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
PDF
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
PDF
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
PDF
XPDDS19: Implementing AMD MxGPU - Jonathan Farrell, Assured Information Security
PDF
XPDDS19: Support of PV Devices in Nested Xen - Jürgen Groß, SUSE
PDF
XPDDS19: Application Agnostic High Availability Solution On Hypervisor Level ...
PDF
XPDSS19: Live-Updating Xen - Amit Shah & David Woodhouse, Amazon
PPTX
XPDDS19: Secure Unikraft Applications with Solo5 - Haibo Xu, ARM
PDF
XPDDS19: The Xen-Blanket for 2019 - Christopher Clark and Kelli Little, Star ...
PDF
XPDSS19: Improve the Reliability and Efficiency of Late Microcode Update - Ch...
PDF
XPDDS19: When Unikraft Meets Arm64 - Jia He, Arm
ELC2019: Static Partitioning Made Simple
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
XPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
XPDDS19: Implementing AMD MxGPU - Jonathan Farrell, Assured Information Security
XPDDS19: Support of PV Devices in Nested Xen - Jürgen Groß, SUSE
XPDDS19: Application Agnostic High Availability Solution On Hypervisor Level ...
XPDSS19: Live-Updating Xen - Amit Shah & David Woodhouse, Amazon
XPDDS19: Secure Unikraft Applications with Solo5 - Haibo Xu, ARM
XPDDS19: The Xen-Blanket for 2019 - Christopher Clark and Kelli Little, Star ...
XPDSS19: Improve the Reliability and Efficiency of Late Microcode Update - Ch...
XPDDS19: When Unikraft Meets Arm64 - Jia He, Arm

Recently uploaded (20)

PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
Essential Infomation Tech presentation.pptx
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
System and Network Administraation Chapter 3
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
System and Network Administration Chapter 2
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Nekopoi APK 2025 free lastest update
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
AI in Product Development-omnex systems
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
wealthsignaloriginal-com-DS-text-... (1).pdf
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Wondershare Filmora 15 Crack With Activation Key [2025
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Essential Infomation Tech presentation.pptx
Navsoft: AI-Powered Business Solutions & Custom Software Development
Which alternative to Crystal Reports is best for small or large businesses.pdf
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
How to Choose the Right IT Partner for Your Business in Malaysia
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
System and Network Administraation Chapter 3
Upgrade and Innovation Strategies for SAP ERP Customers
System and Network Administration Chapter 2
Odoo Companies in India – Driving Business Transformation.pdf
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Nekopoi APK 2025 free lastest update
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
AI in Product Development-omnex systems
Adobe Illustrator 28.6 Crack My Vision of Vector Design

XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerrigan, Assured Information Security, Inc.

  • 1. Client Virtualization Toolstack in Go Nicholas Rosbrook, Software Engineer, Assured Information Security Brendan Kerrigan, Principal Software Engineer, Assured Information Security
  • 2. Overview • Introduction • Motivation • Evaluation • Redfield and redctl • Libxl Go (Golang) bindings • Questions
  • 3. Introduction • Brendan Kerrigan – Principal Engineer at Assured Information Security, Inc. • Hypervisors • Graphics virtualization • Embedded • Nicholas Rosbrook – Software Engineer at Assured Information Security, Inc. • Cryptography • VPNs and Networking • Go expert
  • 4. Motivation • We do a lot of client virtualization work • Utilizing hypervisors to do end point security • Mostly OpenXT based products now • OpenXT isn’t the easiest project to work on (10 years of development means there are lots of components) • Sometimes key high-security features can be a hindrance to some use cases • Client virtualization is pretty different than server virtualization • Especially when it comes to toolstacks
  • 5. Evaluation • What’s out there we can leverage? • XenMgr • Libvirt (+ qubectl) • What if we had a clean slate?
  • 6. XenMgr • XenMgr is high friction • Haskell • Esoteric • Tough to find developers • Lots of legacy interfaces that are unexercised and unaudited (audit in progress) • A lot of cryptic code that essentially reads a database and writes an xl config and calls exec/fork • Local and remote APIs are different  • The command line tool is great
  • 7. Libvirt • One layer of abstraction too many • XML domain configurations are too complex • Designed to work with several virtualization technologies – KVM, Xen, LXC, etc. • We want to work with Xen and do it well • Does a lot more than we need it to • There is an existing Go package (developed by DigitalOcean)
  • 8. redctl • Introducing redctl, the client toolstack to our Xen distribution, Redfield • The good: • A client toolstack where remote and local management APIs are unified • Utilize gRPC • Don’t dictate transport (IPv4, IPv6, PV channels, Argo, vsock) • Easy to understand and test language (Go) • Make the command line tool awesome (like XenMgr’s) • The bad: • Still doing exec/fork a lot when dealing with libxl…
  • 9. What is cgo? • Cgo enables Go programs to call C code through a pseudo- package, “C” • Allows access of C types, variables, and functions • E.g. C.size_t, C.stdout, C.printf • The “preamble” • A block comment used to include headers, set CFLAGS, LDFLAGS, etc. • Immediately precedes the import “C” statement
  • 11. What is cgo? • C fields that cannot be expressed in Go are omitted • The C type void* is represented by Go’s unsafe.Pointer • Cannot call C function pointers from Go • There are some restrictions on passing pointers between C and Go
  • 12. Writing a Go Package for libxl • Writing the cgo code by hand is tedious • Cgo is simple enough to make code generation easy • We use c-for-go: https://github.com/xlab/c-for-go • Define translation and generation rules with a YAML configuration file • Accept or ignore symbols, rename variables, apply rules to a given scope, and more
  • 13. Writing a Go Package for libxl
  • 14. Writing a Go Package for libxl • Finally, we need some wrappers…
  • 15. Writing a Go Package for libxl • Instead of:
  • 16. Writing a Go Package for libxl • We want:
  • 17. Future Work • Continue writing wrappers • Trim the size of the package • Integrate into redctl • Upstream • Current fork: https://github.com/enr0n/xen/tree/libxl-go