HODOR: Shrinking Attack Surface on Node.js via System Call Limitation

06/24/2023
by   Wenya Wang, et al.
0

Node.js provides Node.js applications with system interaction capabilities using system calls. However, such convenience comes with a price, i.e., the attack surface of JavaScript arbitrary code execution (ACE) vulnerabilities is expanded to the system call level. There lies a noticeable gap between existing protection techniques in the JavaScript code level (either by code debloating or read-write-execute permission restriction) and a targeted defense for emerging critical system call level exploitation. To fill the gap, we design and implement HODOR, a lightweight runtime protection system based on enforcing precise system call restrictions when running a Node.js application. HODOR achieved this by addressing several nontrivialial technical challenges. First, HODOR requires to construct high-quality call graphs for both the Node.js application (in JavaScript) and its underlying Node.js framework (in JavaScript and C/C++). Specifically, HODOR incorporates several important optimizations in both the JavaScript and C/C++ level to improve the state-of-the-art tools for building more precise call graphs. Then, HODOR creates the main-thread whitelist and the thread-pool whitelist respectively containing the identified necessary system calls based on the call graphs mappings. Finally, with the whitelists, HODOR implements lightweight system call restriction using the Linux kernel feature Secure Computing Mode (seccomp) to shrink the attack surface. We utilize HODOR to protect 83 real-world Node.js applications compromised by arbitrary code/command execution attacks. HODOR could reduce the attack surface to 16.75 <3

READ FULL TEXT
research
09/06/2021

Lightweight, Multi-Stage, Compiler-Assisted Application Specialization

Program debloating aims to enhance the performance and reduce the attack...
research
10/27/2021

Stubbifier: Debloating Dynamic Server-Side JavaScript Applications

JavaScript is an increasingly popular language for server-side developme...
research
05/15/2019

Neverland: Lightweight Hardware Extensions for Enforcing Operating System Integrity

The security of applications hinges on the trustworthiness of the operat...
research
07/07/2020

VPS: Excavating High-Level C++ Constructs from Low-Level Binaries to Protect Dynamic Dispatching

Polymorphism and inheritance make C++ suitable for writing complex softw...
research
02/20/2018

KASR: A Reliable and Practical Approach to Attack Surface Reduction of Commodity OS Kernels

Commodity OS kernels have broad attack surfaces due to the large code ba...
research
08/06/2023

WASMixer: Binary Obfuscation for WebAssembly

WebAssembly (Wasm) is an emerging binary format that draws great attenti...
research
11/14/2019

A Security Perspective on Unikernels

Cloud-based infrastructures have grown in popularity over the last decad...

Please sign up or login with your details

Forgot password? Click here to reset