Browser (JS Engine) Exploitation

This 3-day course will give students a zero to hero in-depth examination of techniques to exploit JavaScript engine memory corruption bugs in the Firefox and Chrome web browsers. Spidermonkey and V8 will be the targets for exploitation. Spidermonkey is the JS engine in Firefox and V8 is the JS engine in Chrome. The OS environment for the course is Linux. However, the exploitation concepts and techniques presented will work on other platforms.

Course Objectives

To be able to gain code execution in Firefox (Spidermonkey) and Chrome (V8) given a JS engine memory corruption bug. Sandbox escapes will not be covered in this course.

Duration and Schedule

3 Days, 9am – 5pm

Training Outcomes

  • Demonstrate understanding of JS engine internals
  • Demonstrate building exploitation primitives
  • Demonstrate code execution in modern JS engines and web browsers

Who Should Attend?

  • Developers
  • IT Professionals
  • Embedded Developers
  • OS Developers
  • Penetration Testers
  • Software Security Auditors/Analysts
  • Vulnerability Researchers
  • Software Exploitation Developers
  • and anyone interested

About the Trainer

Dr Silvio Cesare is the Managing Director at InfoSect. He has worked in technical roles and been involved in computer security for over 20 years. This period includes time in Silicon Valley in the USA, France, and Australia. He has worked commercially in both defensive and offensive roles within engineering. He has reported hundreds of software bugs and vulnerabilities in Operating Systems kernels. He was previously the Director for Education and Training at UNSW Canberra Cyber, ensuring quality content and delivery. In his early career, he was the scanner architect and a C developer at Qualys. He is also the co-founder of BSides Canberra – Australia’s largest cyber security conference. He has a Ph.D. from Deakin University and has published within industry and academia, is a 4-time Black Hat speaker, gone through academic research commercialisation, and authored a book (Software Similarity and Classification, published by Springer).

What to Bring to Face-to-Face Training?

  • All materials are provided by InfoSect

What Will be Provided in Face-to-Face Training?

  • Laptops for class use
  • Coil bound lecture materials
  • Catering provided.
  • Access to VMs with laboratories
  • InfoSect Swag

What will be Provided in Live, Interactive, Online Training?

  • Lecture notes in PDF
  • Lab guides in PDF
  • Access to VMs with laboratories
  • InfoSect Swag (for Australian shipping only)

Participant Skillset

Students taking Browser (JS Engine) Exploitation should have an intermediate exploitation development background, an exposure in C++ development, and basic JavaScript development experience. Students who have completed the InfoSect courses Code Review and Linux Heap Exploitation will have the prerequisite knowledge. If these courses have not been attended, students should have hands on experience in:

  • Binary Exploitation
  • C++ Coding Experience
  • JavaScript Coding Experience
  • Linux

Class Syllabus
Day 1

Lectures and Labs

  • The Browser Landscape
  • Browser Architecture
  • Security the Browser
  • Javascript Engine Overview
  • V8 Data Types
  • Orinoco – The V8 Garbage Collector
  • Custom Built-ins in V8
  • Arbitrary R/W Primitives in V8
  • Arbitrary R/W to Code Execution in V8

Day 2
Lectures and Labs

  • Relative R/W to Addrof/Fakeobj in V8
  • Addrof/Fakeobj to Limited Arbitrary R/W in V8
  • Limited Arbitrary R/W to Full Arbitrary R/W in V8

Day 3
Lectures and Labs

  • Spidermonkey Data Types
  • The Spidermonkey Heaps
  • Custom Built-ins in Spidermonkey
  • JIT Style Attacks
  • Relative R/W to Stable Arbitrary R/W in Spidermonkey
  • Arbitrary R/W to Code Execution in Spidermonkey