Trojan Source: Invisible Vulnerabilities

10/30/2021
by   Nicholas Boucher, et al.
0

We present a new type of attack in which source code is maliciously encoded so that it appears different to a compiler and to the human eye. This attack exploits subtleties in text-encoding standards such as Unicode to produce source code whose tokens are logically encoded in a different order from the one in which they are displayed, leading to vulnerabilities that cannot be perceived directly by human code reviewers. 'Trojan Source' attacks, as we call them, pose an immediate threat both to first-party software and of supply-chain compromise across the industry. We present working examples of Trojan-Source attacks in C, C++, C#, JavaScript, Java, Rust, Go, and Python. We propose definitive compiler-level defenses, and describe other mitigating controls that can be deployed in editors, repositories, and build pipelines while compilers are upgraded to block this attack.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
11/02/2017

BinPro: A Tool for Binary Source Code Provenance

Enforcing open source licenses such as the GNU General Public License (G...
research
10/31/2022

Poison Attack and Defense on Deep Source Code Processing Models

In the software engineering community, deep learning (DL) has recently b...
research
02/01/2023

Developing Hands-on Labs for Source Code Vulnerability Detection with AI

As the role of information and communication technologies gradually incr...
research
06/28/2022

Building a Secure Software Supply Chain with GNU Guix

The software supply chain is becoming a widespread analogy to designate ...
research
01/02/2014

Structured Generative Models of Natural Source Code

We study the problem of building generative models of natural source cod...
research
08/29/2018

Timelines for In-Code Discovery of Zero-Day Vulnerabilities and Supply-Chain Attacks

Zero-day vulnerabilities can be accidentally or maliciously placed in co...
research
10/02/2019

Analyzing Control Flow Integrity with LLVM-CFI

Control-flow hijacking attacks are used to perform malicious com-putatio...

Please sign up or login with your details

Forgot password? Click here to reset