SMaCk: Efficient Instruction Cache Attacks via Self-Modifying Code Conflicts

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Son, Seonghun, Moghimi, Daniel, Gulmezoglu, Berk
Format: Preprint
Publié: 2025
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866915143068155904
author Son, Seonghun
Moghimi, Daniel
Gulmezoglu, Berk
author_facet Son, Seonghun
Moghimi, Daniel
Gulmezoglu, Berk
contents Self-modifying code (SMC) allows programs to alter their own instructions, optimizing performance and functionality on x86 processors. Despite its benefits, SMC introduces unique microarchitectural behaviors that can be exploited for malicious purposes. In this paper, we explore the security implications of SMC by examining how specific x86 instructions affecting instruction cache lines lead to measurable timing discrepancies between cache hits and misses. These discrepancies facilitate refined cache attacks, making them less noisy and more effective. We introduce novel attack techniques that leverage these timing variations to enhance existing methods such as Prime+Probe and Flush+Reload. Our advanced techniques allow adversaries to more precisely attack cryptographic keys and create covert channels akin to Spectre across various x86 platforms. Finally, we propose a dynamic detection methodology utilizing hardware performance counters to mitigate these enhanced threats.
format Preprint
id arxiv_https___arxiv_org_abs_2502_05429
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle SMaCk: Efficient Instruction Cache Attacks via Self-Modifying Code Conflicts
Son, Seonghun
Moghimi, Daniel
Gulmezoglu, Berk
Cryptography and Security
Hardware Architecture
Self-modifying code (SMC) allows programs to alter their own instructions, optimizing performance and functionality on x86 processors. Despite its benefits, SMC introduces unique microarchitectural behaviors that can be exploited for malicious purposes. In this paper, we explore the security implications of SMC by examining how specific x86 instructions affecting instruction cache lines lead to measurable timing discrepancies between cache hits and misses. These discrepancies facilitate refined cache attacks, making them less noisy and more effective. We introduce novel attack techniques that leverage these timing variations to enhance existing methods such as Prime+Probe and Flush+Reload. Our advanced techniques allow adversaries to more precisely attack cryptographic keys and create covert channels akin to Spectre across various x86 platforms. Finally, we propose a dynamic detection methodology utilizing hardware performance counters to mitigate these enhanced threats.
title SMaCk: Efficient Instruction Cache Attacks via Self-Modifying Code Conflicts
topic Cryptography and Security
Hardware Architecture
url https://arxiv.org/abs/2502.05429