Abstract

Writing desktop applications in JavaScript offers developers the opportunity to create cross-platform applications with cutting-edge capabilities. However, in doing so, they are potentially submitting their code to a number of unsanctioned modifications from malicious actors. Electron is one such JavaScript application framework which facilitates this multi-platform out-the-box paradigm and is based upon the Node.js JavaScript runtime—an increasingly popular server-side technology. By bringing this technology to the client-side environment, previously unrealized risks are exposed to users due to the powerful system programming interface that Node.js exposes. In a concerted effort to highlight previously unexposed risks in these rapidly expanding frameworks, this paper presents the Mayall Framework, an extensible toolkit aimed at JavaScript security auditing and post-exploitation analysis. This paper also exposes fifteen highly popular Electron applications and demonstrates that two-thirds of applications were found to be using known vulnerable elements with high CVSS (Common Vulnerability Scoring System) scores. Moreover, this paper discloses a wide-reaching and overlooked vulnerability within the Electron Framework which is a direct byproduct of shipping the runtime unaltered with each application, allowing malicious actors to modify source code and inject covert malware inside verified and signed applications without restriction. Finally, a number of injection vectors are explored and appropriate remediations are proposed.

Highlights

  • Application designers often seek to produce high-quality, cross platform applications in order to maximize their customer base

  • This paper explores the current state of security surrounding the Electron framework and the underlying Node.js constructs and demonstrates real world risks associated with this through the introduction of a post-exploitation framework built in Node.js, leveraging the modular structure of the language

  • This section aims to highlight the stages of development of the Mayall framework, an extensible toolkit aimed at JavaScript security auditing and post-exploitation

Read more

Summary

Introduction

Application designers often seek to produce high-quality, cross platform applications in order to maximize their customer base. When contemporary frameworks grow at such exponential rates, including adoption from major players such as Microsoft [3], NVIDIA [4] and Slack [5], it is crucial that the security awareness surrounding the product does not go amiss This reliance on the Node.js JavaScript runtime and the package manager that is used so prolifically with it compounds the security issues, as it adds additional levels of complexity which each require individual consideration with regards to security. The remainder of this paper is organized as follows: In Section 2, an assessment of the current state of JavaScript security is performed and categories of vulnerabilities, language constructs and application management are discussed

Background and Related Work
Web-Based JavaScript
Electron
Node Security
The npm Registry and Module Security
Typosquatting
Trojan Modules
Developer Attitudes
Design and Implementation
Application Auditing
Malicious Update Process
Update Electron Packages
Enumerating Update Endpoints
Building Malicious Updates
Malicious Exploit Design
Malicious Exploit Design—A Dropper Module
Covertly Embedding Modules
Executing JavaScript Natively on a Target Machine
A Framework for Post-Exploitation
Scanning Module
Update Injection and Malicious Modules
The Implementation of the Mayall framework
Git Commit Divergence
Update Process
Application Signing Against Runtime
Secure TLS Connections
Repackaging Binaries
Developer Involvement with the Node Security Platform
Current Remediations
Conclusions
Future Work
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call